mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 21:05:52 +10:00
45 lines
984 B
Bash
Executable File
45 lines
984 B
Bash
Executable File
#!/bin/bash
|
|
display_error() {
|
|
tput sgr0
|
|
tput setaf 1
|
|
echo "ERROR: $1"
|
|
tput sgr0
|
|
exit 1
|
|
}
|
|
|
|
[[ $gvm_go_name != "" ]] ||
|
|
display_error "No Go version selected"
|
|
[[ -d $GVM_ROOT/gos/$gvm_go_name ]] ||
|
|
display_error "Invalid or corrupt Go version"
|
|
[[ -d $GVM_ROOT/pkgsets/$gvm_go_name ]] ||
|
|
display_error "Missing package set folder for this Go version"
|
|
|
|
command=$1
|
|
if [ -f $GVM_ROOT/scripts/pkgset-$command ]; then
|
|
shift
|
|
$GVM_ROOT/scripts/pkgset-$command $@
|
|
elif [[ -n $command ]]; then
|
|
display_error "Unrecognized command line argument: '$command'"
|
|
else
|
|
echo "= gvm pkgset
|
|
|
|
* http://github.com/moovweb/gvm
|
|
|
|
== DESCRIPTION:
|
|
|
|
GVM pkgset is used to manage various Go packages
|
|
|
|
== Usage
|
|
|
|
gvm pkgset Command
|
|
|
|
== Command
|
|
|
|
create - create a new package set
|
|
delete - delete a package set
|
|
use - select where gb and goinstall target and link
|
|
empty - remove all code and compiled binaries from package set
|
|
list - list installed go packages"
|
|
fi
|
|
|