mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 12:56:41 +10:00
30 lines
503 B
Bash
Executable File
30 lines
503 B
Bash
Executable File
#!/bin/bash
|
|
if [[ "$1" == "" ]]; then
|
|
echo "ERROR: Please specify the package name"
|
|
exit 1
|
|
fi
|
|
|
|
UNINSTALL_ROOT=$GVM_ROOT/pkgs/pkg.gvm/$1
|
|
if [[ ! -d $UNINSTALL_ROOT ]]; then
|
|
echo "ERROR: Invalid package name"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ "$2" != "" ]]; then
|
|
UNINSTALL_ROOT=$UNINSTALL_ROOT/$2
|
|
fi
|
|
|
|
if [[ -d $UNINSTALL_ROOT ]]; then
|
|
rm -rf $UNINSTALL_ROOT
|
|
else
|
|
echo "ERROR: Invalid package version"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ "$4" != "" ]]; then
|
|
echo "Uninstalled $1 version $2"
|
|
else
|
|
echo "Uninstalled $1"
|
|
fi
|
|
|