Skip to content

Commit

Permalink
adjust build script
Browse files Browse the repository at this point in the history
  • Loading branch information
jdillon committed May 15, 2017
1 parent 0915dda commit 937e121
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function die {

# show usage and exit
function usage {
echo "usage: $basename $*"
echo "usage: $basename <command> [options]"
exit 2
}

Expand All @@ -34,6 +34,12 @@ function mvn {
}

command="$1"; shift

# complain if no command is given
if [ -z "$command" ]; then
usage
fi

case "$command" in
# change the version of the project
change-version)
Expand Down Expand Up @@ -102,8 +108,9 @@ case "$command" in
if [ "$(type -t $fn)" = 'function' ]; then
$fn $*
else
# give up and complain
usage "<command> [options]"
# complain about missing command function
echo "Unknown command: $command"
usage
fi
;;
esac

0 comments on commit 937e121

Please sign in to comment.