Merge pull request #42 from eaigner/master

pkgenv command to edit package set environments. Fixes #41.
This commit is contained in:
jbussdieker
2013-12-12 05:44:50 -08:00
2 changed files with 37 additions and 0 deletions
+1
View File
@@ -51,6 +51,7 @@ Commands:
listall - list available versions
alias - manage go version aliases
pkgset - manage go packages sets
pkgenv - edit the environment for a package set
"
fi
fi
Executable
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
function show_usage() {
echo "Usage: gvm pkgenv [packageset-name]"
echo
echo " -h, --help Display this message."
echo
echo "The [packageset-name] is optional."
echo
}
for i in $*; do
case $i in
-h|--help*)
show_usage
exit 0
;;
*)
gvm_env="$i"
;;
esac
done
if [ -z $gvm_go_name ]; then
display_fatal "current go version not managed by gvm"
fi
if [ ! -z $gvm_env ]; then
gvm_env="@$gvm_env"
fi
env_file=$GVM_ROOT/environments/$gvm_go_name$gvm_env
vi $env_file