mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
Fix error and dependency checking
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
@@ -9,4 +9,5 @@ display_warning() {
|
||||
else
|
||||
echo "$1"
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
+10
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user