Argument count check

This commit is contained in:
Brandon Rozek 2023-03-29 21:25:00 -04:00
parent d6bc88566f
commit 8790ccde66
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480

View file

@ -1,6 +1,18 @@
#!/bin/sh
# TODO: Argument check and show usage
set -o errexit
set -o nounset
show_usage() {
echo "Usage: ./run_spectra.sh [FILENAME]"
exit 1
}
# Check argument count
if [ "$#" -ne 1 ]; then
show_usage
fi
mvn -q exec:java -Dexec.mainClass="com.naveensundarg.planner.utils.Runner" -Dexec.args="$1"