diff --git a/isidore.sh b/isidore.sh index 071fd95..4072372 100755 --- a/isidore.sh +++ b/isidore.sh @@ -260,28 +260,25 @@ case $1 in build) VERBOSE=0 JOBS=1 - if [ $# -gt 1 ] - then - for i in ${@:2} - do - case $i in - -v) - VERBOSE=1;; - -j*) - if ! [[ "$i" =~ ^-j[0-9]+$ ]] - then - echo "Argument '$i' badly formatted. Should be '-j' where is a number." - print_usage - exit 1 - fi - JOBS=${i:2};; - *) - echo "Unknown argument for build '$i'. Use the 'help' subcommand." + for i in ${@:2} + do + case $i in + -v) + VERBOSE=1;; + -j*) + if ! [[ "$i" =~ ^-j[0-9]+$ ]] + then + echo "Argument '$i' badly formatted. Should be '-j' where is a number." print_usage - exit 1;; - esac - done - fi + exit 1 + fi + JOBS=${i:2};; + *) + echo "Unknown argument for build '$i'. Use the 'help' subcommand." + print_usage + exit 1;; + esac + done build_project $VERBOSE $JOBS;; serve|server) php -S localhost:8080 -t $OUTPUT_DIR/;;