Skip to content

Commit

Permalink
Use elif instead of nested else.
Browse files Browse the repository at this point in the history
  • Loading branch information
rejeep committed Oct 9, 2012
1 parent f82ea93 commit 8c01b3e
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions bin/carton
Expand Up @@ -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

Expand Down

0 comments on commit 8c01b3e

Please sign in to comment.