diff --git a/bin/gvm b/bin/gvm index 42d83d7..7070530 100755 --- a/bin/gvm +++ b/bin/gvm @@ -20,7 +20,7 @@ fi $GVM_ROOT/scripts/gvm-check if [[ "$?" != "0" ]]; then - display_error "Missing requirements. Please see messages above" + display_error "Missing requirements." fi if [[ $command == "version" ]]; then diff --git a/binscripts/gvm-installer b/binscripts/gvm-installer index bd194b8..69e0442 100755 --- a/binscripts/gvm-installer +++ b/binscripts/gvm-installer @@ -50,7 +50,11 @@ SRC_REPO=https://github.com/moovweb/gvm.git [ "$GVM_DEST" == "" ] && display_error "No destination specified!" [ -d $GVM_DEST/$GVM_NAME ] && display_error "Already installed!" [ -d $GVM_DEST ] || mkdir -p $GVM_DEST > /dev/null 2>&1 || display_error "Failed to create $GVM_DEST" -[ -z `which git` ] && display_error '* Could not find git (try `sudo apt-get install git`)' +[ -z `which git` ] && display_error "Could not find git + + linux: apt-get install git + mac: brew install git +" cd $GVM_DEST && git clone $SRC_REPO $GVM_NAME > /dev/null 2>&1 || display_error "Failed to clone from $SRC_REPO into $GVM_DEST/$GVM_NAME" diff --git a/scripts/gvm-check b/scripts/gvm-check index 7f43b51..209fc74 100755 --- a/scripts/gvm-check +++ b/scripts/gvm-check @@ -1,15 +1,37 @@ #!/bin/bash . $GVM_ROOT/scripts/functions +# Check for hg [ -z `which hg` ] && - display_error '* Could not find mercurial (try `sudo apt-get install mercurial`)' -[ -z `which ar` ] && - display_error '* Could not find binutils (try `sudo apt-get install binutils (or binutils-multiarch)`)' -[ -z `which bison` ] && - display_error '* Could not find bison (try `sudo apt-get install bison`)' -[ -z `which gcc` ] && - display_error '* Could not find gcc (try `sudo apt-get install gcc`)' -[ -z `which make` ] && - display_error '* Could not find make (try `sudo apt-get install make`)' + display_warning "Could not find mercurial + linux: apt-get install mercurial + mac: brew install mercurial +" && exit 1 +# Check for ar +[ -z `which ar` ] && + display_warning "Could not find binutils + + linux: apt-get install binutils +" && exit 1 +# Check for bison +[ -z `which bison` ] && + display_warning "Could not find bison + + linux: apt-get install bison +" && exit 1 +# Check for gcc +[ -z `which gcc` ] && + display_warning "Could not find gcc + + linux: apt-get install gcc +" && exit 1 +# Check for make +[ -z `which make` ] && + display_warning "Could not find make + + linux: apt-get install make +" && exit 1 + +# All good! exit 0