2
0
mirror of https://github.com/gitwatch/gitwatch synced 2024-11-15 06:12:52 +00:00

Shift input arguments so code referencing first arg still works

This commit is contained in:
Nevik Rehnel 2012-12-01 00:30:57 +01:00
parent d8096cad4d
commit 1c822907c3

View File

@ -42,14 +42,17 @@ fi
while getopts b:hp: option
do
case "${option}"
in
b) BRANCH=${OPTARG};;
h) shelp; exit;;
p) REMOTE=${OPTARG};;
case "${option}" in
b)
BRANCH=${OPTARG};;
h) shelp; exit;;
p)
REMOTE=${OPTARG};;
esac
done
shift $((OPTIND-1)) #Shift the input arguments, so that the input file (last arg) is $1 in the code below
# Check for both git and inotifywait and generate an error
# if either don't exist or you cannot run them