Skip to content

Commit

Permalink
add uninstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
nwg-piotr committed Jun 27, 2024
1 parent 52b0f86 commit bab8039
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

PROGRAM_NAME="nwg-clipman"
MODULE_NAME="nwg_clipman"
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 script
if [ -f "/usr/bin/$PROGRAM_NAME" ]; then
echo "Removing /usr/bin/$PROGRAM_NAME"
rm "/usr/bin/nwg-clipman"
fi

echo "Removing icon, .desktop file, license and readme"
rm -f "/usr/share/pixmaps/$PROGRAM_NAME.svg"
rm -f "/usr/share/applications/$PROGRAM_NAME.desktop"
rm -f "/usr/share/licenses/$PROGRAM_NAME/LICENSE"
rm -f "/usr/share/doc/$PROGRAM_NAME/README.md"

0 comments on commit bab8039

Please sign in to comment.