Luna/tools/uninstall-package.sh

21 lines
354 B
Bash
Raw Permalink Normal View History

2023-07-24 15:07:49 +00:00
#!/usr/bin/env bash
set -e
source $(dirname $0)/env.sh
cd $LUNA_BASE
PORT_NAME=$1
PORT_FILES=$LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files
if ! [ -f $PORT_FILES ]
then
echo "Package $PORT_NAME has not been installed."
exit 1
fi
set +e
2023-07-24 15:07:49 +00:00
rm -v $(cat $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files)
rm -v $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files