mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
Update pkg uninstall command
This commit is contained in:
+16
-1
@@ -4,7 +4,22 @@ if [[ "$1" == "" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
UNINSTALL_ROOT=$GVM_ROOT/pkgs/pkg.gvm/$1
|
||||
display_error() {
|
||||
tput sgr0
|
||||
tput setaf 1
|
||||
echo "ERROR: $1"
|
||||
tput sgr0
|
||||
exit 1
|
||||
}
|
||||
|
||||
[[ $gvm_go_name != "" ]] ||
|
||||
display_error "No Go version selected"
|
||||
[[ $gvm_pkgset_name != "" ]] ||
|
||||
display_error "No package set selected"
|
||||
|
||||
gvm_go_path=$GVM_ROOT/pkgsets/$gvm_go_name/$gvm_pkgset_name
|
||||
|
||||
UNINSTALL_ROOT=$gvm_go_path/pkg.gvm/$1
|
||||
if [[ ! -d $UNINSTALL_ROOT ]]; then
|
||||
echo "ERROR: Invalid package name"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user