From 8c01b3e8c01770bd66100b2be34602e1c73e8361 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 9 Oct 2012 07:32:53 +0200 Subject: [PATCH] Use elif instead of nested else. --- bin/carton | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/bin/carton b/bin/carton index e5b0b373..eb30b32c 100755 --- a/bin/carton +++ b/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