]> arthur.barton.de Git - ax-zsh.git/commitdiff
install.sh: Check if zsh(1) is available
authorAlexander Barton <alex@barton.de>
Sun, 9 Aug 2015 18:23:49 +0000 (20:23 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 9 Aug 2015 18:23:49 +0000 (20:23 +0200)
install.sh

index 526256cb9dfb9b8331466b3b7cae2e6dd60c0597..0c50964d91ea1a282f7bf4a04bef0392da45d50d 100755 (executable)
@@ -43,7 +43,14 @@ done
 
 if [ ! -d "$AXZSH/active_plugins" ]; then
        ax_msg - "Initializing plugin directory \"$AXZSH/active_plugins\" ..."
-       zsh "$AXZSH/bin/axzshctl" reset-plugins
+       type zsh >/dev/null 2>&1
+       if [ $? -eq 0 ]; then
+               zsh "$AXZSH/bin/axzshctl" reset-plugins
+               exit $?
+       else
+               ax_msg 2 "Oops, \"zsh\" not found!?"
+               exit 1
+       fi
 else
        ax_msg - "Plugin directory \"$AXZSH/active_plugins\" already exists. Ok."
 fi