mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
Added gvm use version
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user