Better error handling

This commit is contained in:
Joshua Bussdieker
2011-12-09 11:09:06 -08:00
parent d38a51fc4a
commit d64ac96a66
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -8,6 +8,12 @@ if [ -z "$GVM_ROOT" ]; then
exit 1
fi
$GVM_ROOT/bin/gvm-check
if [[ "$?" != "0" ]]; then
echo "ERROR: Missing requirements. Please see messages above"
exit 1
fi
if [[ $1 == "version" ]]; then
echo "Go Version Manager v$GVM_VERSION"
elif [[ $1 == "implode" ]]; then
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
if [ -z `which hg` ]; then
echo 'Could not find mercurial (try `sudo apt-get install mercurial`)'
echo '* Could not find mercurial (try `sudo apt-get install mercurial`)'
exit 1
fi