mirror of
https://github.com/nwg-piotr/nwg-displays.git
synced 2026-03-11 17:33:57 -05:00
add uninstall script
This commit is contained in:
27
uninstall.sh
Executable file
27
uninstall.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PROGRAM_NAME="nwg-displays"
|
||||
MODULE_NAME="nwg_displays"
|
||||
SITE_PACKAGES="$(python3 -c "import sysconfig; print(sysconfig.get_paths()['purelib'])")"
|
||||
PATTERN="$SITE_PACKAGES/$MODULE_NAME*"
|
||||
|
||||
# Remove from site_packages
|
||||
for path in $PATTERN; do
|
||||
if [ -e "$path" ]; then
|
||||
echo "Removing $path"
|
||||
rm -r "$path"
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove launcher scripts
|
||||
filenames=("/usr/bin/nwg-displays")
|
||||
|
||||
for filename in "${filenames[@]}"; do
|
||||
rm -f "$filename"
|
||||
echo "Removing -f $filename"
|
||||
done
|
||||
|
||||
rm -f "/usr/share/applications $PROGRAM_NAME.desktop"
|
||||
rm -f "/usr/share/pixmaps $PROGRAM_NAME.svg"
|
||||
rm -f /usr/share/licenses/$PROGRAM_NAME/LICENSE
|
||||
rm -f /usr/share/doc/$PROGRAM_NAME/README.md
|
||||
Reference in New Issue
Block a user