Do sanity checking early

Fail before doing anything when passed parameters are invalid.
This commit is contained in:
Romain Tartière 2018-04-07 11:34:07 +02:00
parent 61d0147e49
commit 211ecc58b5

View File

@ -1,5 +1,10 @@
#!/bin/sh
if [ $# -ne 2 -o ! -d "$1" -o ! -d "$1/$2" ]; then
echo "usage: $0 <environmentpath> <environment>" >&2
exit 1
fi
ruby=ruby
script="$1/$2/scripts/config_version.rb"