Luna/tools/uninstall-package.sh
apio 9a00b29304
All checks were successful
continuous-integration/drone/push Build is passing
ports: Basic ports system + nasm port
2023-07-24 17:07:49 +02:00

20 lines
395 B
Bash
Executable File

#!/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
rm -v $(cat $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files)
rm -v $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files
rm -v $LUNA_ROOT/ports/local/$PORT_NAME-*.tar.gz