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:
parent
d8096cad4d
commit
1c822907c3
13
gitwatch.sh
13
gitwatch.sh
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user