Browse files

Use elif instead of nested else.

  • Loading branch information...
1 parent f82ea93 commit 8c01b3e8c01770bd66100b2be34602e1c73e8361 @rejeep rejeep committed Oct 9, 2012
Showing with 10 additions and 14 deletions.
  1. +10 −14 bin/carton
View
24 bin/carton
@@ -11,21 +11,17 @@ if [[ $# -eq 0 ]]; then
else
if [[ $1 == "package" ]]; then
COMMAND=package
+ elif [[ $1 == "install" ]]; then
+ COMMAND=install
+ elif [[ $1 == "exec" ]]; then
+ EMACSLOADPATH=$($EMACS -Q --batch --eval '(message (mapconcat (quote identity) (append (file-expand-wildcards "elpa/*" t) load-path) ":"))' 2>&1) ${@:2}
else
- if [[ $1 == "install" ]]; then
- COMMAND=install
- else
- if [[ $1 == "exec" ]]; then
- EMACSLOADPATH=$($EMACS -Q --batch --eval '(message (mapconcat (quote identity) (append (file-expand-wildcards "elpa/*" t) load-path) ":"))' 2>&1) ${@:2}
- else
- echo "Could not find task '$1'."
- echo "usage: carton [INSTALL]"
- echo " carton package"
- echo " carton exec [COMMAND]"
-
- exit 1
- fi
- fi
+ echo "Could not find task '$1'."
+ echo "usage: carton [INSTALL]"
+ echo " carton package"
+ echo " carton exec [COMMAND]"
+
+ exit 1
fi
fi

0 comments on commit 8c01b3e

Please sign in to comment.