Files
gvm/scripts/pkgset-list
T
COLDTURNIP f3a0ec1274 Allow managing pkgset under local folder.
While replacing pakcageset name with "--local", the packageset
information will be managed under some/local/repo/.gvm_local folder, and
add the root path of repository as the first path in GOPATH and PATH.
This makes the repository more portable since we don't store all the
go-installed package files under $HOME/.gvm .

The repository root path for gvm is definded as $PWD while
"pkgset create --local" . When "pkgset list" under some configured local
repository, it will list the root path as the first packageset, and
marked with "L".
2013-02-11 02:19:00 +08:00

30 lines
623 B
Bash
Executable File

#!/usr/bin/env bash
. $GVM_ROOT/scripts/functions
echo
display_message "gvm go package sets ($gvm_go_name)"
echo
if [[ -d $GVM_ROOT/pkgsets/$gvm_go_name ]]; then
pkgset_local=$(find_local_pkgset)
if [[ -d $pkgset_local ]]; then
if [[ "$gvm_pkgset_name" == "__local__" ]]; then
echo "=>L $pkgset_local"
else
echo " L $pkgset_local"
fi
fi
for cur_dir in $GVM_ROOT/pkgsets/$gvm_go_name/*; do
[[ "$cur_dir" == "$GVM_ROOT/pkgsets/$gvm_go_name/*" ]] && exit
pkgset=`basename $cur_dir`
if [[ "$gvm_pkgset_name" == "$pkgset" ]]; then
echo "=> $pkgset"
else
echo " $pkgset"
fi
done
fi
echo