mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-10 05:16:13 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8b4b1f4ed | ||
|
|
325e9a75f3 | ||
|
|
033c72a113 | ||
|
|
45a4d1ff42 | ||
|
|
faac33ab5e | ||
|
|
8999f3f072 | ||
|
|
3f72ed5f89 | ||
|
|
7765f13d9a |
+1
-1
@@ -65,7 +65,7 @@ _gvm()
|
||||
use|uninstall)
|
||||
[ ! -d $GVM_ROOT/gos ] && return 1
|
||||
[[ $COMP_CWORD > 2 ]] && return 1
|
||||
local installed_versions=$(for x in `$LS_PATH $GVM_ROOT/gos`; do echo ${x} ; done )
|
||||
local installed_versions="$(for x in `$LS_PATH $GVM_ROOT/gos`; do echo ${x} ; done )"
|
||||
COMPREPLY=( $(compgen -W "${installed_versions}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
|
||||
Vendored
+2
-2
@@ -20,7 +20,7 @@ function gvm_pkgset_use() {
|
||||
[[ "$2" != "--default" ]] ||
|
||||
display_error "Cannot set local pkgset as default" || return 1
|
||||
|
||||
export PATH=$GVM_PATH_BACKUP
|
||||
gvm_export_path
|
||||
. "$LOCAL_TOP/environments/$fuzzy_match" ||
|
||||
display_error "Failed to source the package set environment" || return 1
|
||||
|
||||
@@ -30,7 +30,7 @@ function gvm_pkgset_use() {
|
||||
fuzzy_match=`$LS_PATH $GVM_ROOT/environments | $SORT_PATH | $GREP_PATH "$gvm_go_name@" | $GREP_PATH "$1" | $HEAD_PATH -n 1` ||
|
||||
display_error "Invalid package set" || return 1
|
||||
|
||||
export PATH=$GVM_PATH_BACKUP
|
||||
gvm_export_path
|
||||
. "$GVM_ROOT/environments/$fuzzy_match" ||
|
||||
display_error "Failed to source the package set environment" || return 1
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -14,7 +14,7 @@ function gvm_use() {
|
||||
fi
|
||||
fi
|
||||
|
||||
export PATH=$GVM_PATH_BACKUP
|
||||
gvm_export_path
|
||||
. $GVM_ROOT/environments/$fuzzy_match &> /dev/null || display_error "Couldn't source environment" || return 1
|
||||
if [[ "$2" == "--default" ]]; then
|
||||
cp $GVM_ROOT/environments/$fuzzy_match $GVM_ROOT/environments/default || display_error "Couldn't make $fuzzy_match default"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
function gvm_export_path() {
|
||||
export PATH="$GVM_ROOT/bin:`echo "$PATH" | tr ":" "\n" | grep -v '^$' | egrep -v "$GVM_ROOT/(pkgsets|gos|bin)" | tr "\n" ":" | sed 's/:*$//'`"
|
||||
export GVM_PATH_BACKUP="$PATH"
|
||||
}
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ main() {
|
||||
which goinstall &> /dev/null ||
|
||||
GVM_GOINSTALL="go get"
|
||||
|
||||
x="`hg tags -R ~/.gvm/archive/go`"; echo ${x#*b0819469a6df} | $GREP_PATH "$version " &> /dev/null
|
||||
x="`hg tags -R $GO_CACHE_PATH`"; echo ${x#*b0819469a6df} | $GREP_PATH "$version " &> /dev/null
|
||||
if [[ "$?" == "1" ]]; then
|
||||
if [[ "$INSTALL_BUILD_TOOLS" == "true" ]]; then
|
||||
install_gb || display_warning "Failed to install gb"
|
||||
|
||||
Reference in New Issue
Block a user