Prerequisites check: Test for non-zero value

Also, use alternate syntax for which-test and exit with non-zero exit
code for git-test as well.
pull/11/head
Dominik D. Geyer 12 years ago
parent 9f71f494eb
commit c85025d456

@ -65,16 +65,14 @@ shift $((OPTIND-1)) # Shift the input arguments, so that the input file (last ar
# Check for both git and inotifywait and generate an error
# if either don't exist or you cannot run them
which git &>/dev/null
if [ $? -eq 1 ]; then
if ! which git &>/dev/null; then
echo >&2 "Git not found and it is required to use this script."
exit 1
fi
which inotifywait &>/dev/null
if [ $? -eq 1 ]; then
if ! which inotifywait &>/dev/null; then
echo >&2 "inotifywait not found and it is required to use this script."
exit
exit 1
fi
# These two strings are used to construct the commit comment

Loading…
Cancel
Save