Added gvm use version

This commit is contained in:
Joshua Bussdieker
2011-11-17 23:34:00 -08:00
parent 62e074f4f9
commit 421e0ffb24
2 changed files with 20 additions and 1 deletions
+4 -1
View File
@@ -4,12 +4,15 @@ elif [[ $1 == "implode" ]]; then
rm -rf ~/.gvm
elif [[ $1 == "install" ]]; then
~/.gvm/bin/gvm-install $@
elif [[ $1 == "use" ]]; then
~/.gvm/bin/gvm-use $@
else
echo "== Usage
gvm Action
== Action
version - print the gvm version number
implode - completely remove gvm
install - install go versions"
install - install go versions
use - select a go version to use"
fi
Executable
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
if [[ $1 == "use" ]]; then
if [[ -n $2 ]]; then
cp ~/.gvm/gos/go-$2/bin/* ~/.gvm/bin
echo "Now using version $2"
exit 0
else
echo "ERROR: Please specifiy the version"
exit 1
fi
else
echo "Please use gvm [action] to call this file"
exit 1
fi