Fix error and dependency checking

This commit is contained in:
Joshua Bussdieker
2012-03-28 22:03:40 -07:00
parent 5b7c7d708b
commit 0cc983dec8
3 changed files with 13 additions and 12 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ fi
$GVM_ROOT/scripts/gvm-check
if [[ "$?" != "0" ]]; then
display_error "Missing requirements."
display_fatal "Missing requirements."
fi
if [[ $command == "version" ]]; then
@@ -30,7 +30,7 @@ else
shift
$GVM_ROOT/scripts/$command $@
elif [[ -n $command ]]; then
display_error "Unrecognized command line argument: '$command'"
display_fatal "Unrecognized command line argument: '$command'"
else
echo "Usage: gvm [command]
+1
View File
@@ -9,4 +9,5 @@ display_warning() {
else
echo "$1"
fi
return 1
}
+10 -10
View File
@@ -2,36 +2,36 @@
. $GVM_ROOT/scripts/functions
# Check for hg
[ -z `which hg` ] &&
which hg &> /dev/null ||
display_warning "Could not find mercurial
linux: apt-get install mercurial
mac: brew install mercurial
" && exit 1
" || exit 1
# Check for ar
[ -z `which ar` ] &&
which ar &> /dev/null ||
display_warning "Could not find binutils
linux: apt-get install binutils
" && exit 1
" || exit 1
# Check for bison
[ -z `which bison` ] &&
which bison &> /dev/null ||
display_warning "Could not find bison
linux: apt-get install bison
" && exit 1
" || exit 1
# Check for gcc
[ -z `which gcc` ] &&
which gcc &> /dev/null ||
display_warning "Could not find gcc
linux: apt-get install gcc
" && exit 1
" || exit 1
# Check for make
[ -z `which make` ] &&
which make &> /dev/null ||
display_warning "Could not find make
linux: apt-get install make
" && exit 1
" || exit 1
# All good!
exit 0