generate-version: exit early if argc is not 3

Print usage information and exit if the number of arguments is not 3.
This commit is contained in:
Pranjal Kole 2022-02-04 19:10:16 +05:30
parent 63b12d4cdc
commit a9bbbda1c7

View file

@ -2,6 +2,11 @@
set -e
if [ ${#} -ne 3 ]; then
echo "Usage: ${0} <default_version> <src_dir> <out_file>"
exit 1
fi
default_version=${1}
src_dir=${2}
out_file=${3}