Remove unnecessary if-statement.

This commit is contained in:
Nicolás A. Ortega Froysa 2022-11-10 19:22:24 +01:00
parent fc50e669a5
commit 1d1406bb2b

View File

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