feat: Removes old uninstall-webapp script.

This commit is contained in:
2025-09-29 18:06:06 -04:00
parent 4ae6389ae8
commit d78ec7f853
2 changed files with 1 additions and 46 deletions

View File

@@ -1,44 +0,0 @@
#!/usr/bin/env bash
# Uninstall's a web app, including it's icon.
app_dir="$HOME/.local/share/applications"
spec=""
file=""
while [[ $# -gt 0 ]]; do
if [[ $1 =~ "-f" ]] || [[ $1 =~ "--file" ]]; then
shift
file=$(jq -r '.name' $1)
else
file=$1
fi
shift
done
if [[ -z "$file" ]]; then
echo -e "Must supplye a web app name to uninstall.\n\n"
echo "Usage: uninstall-webapp <name | path>"
exit 1
fi
file="$(basename $file)"
if [[ ! $file =~ \.desktop$ ]]; then
file="$file.desktop"
fi
desktop="$app_dir/$file"
if [[ ! -f "$desktop" ]]; then
echo "No webapp found @: $desktop"
exit 1
fi
icon=$(cat $desktop | grep "Icon")
icon="${icon/#Icon=/}"
echo "Removing Application: $desktop"
rm -rf "$desktop"
echo "Removing Icon: $icon"
rm -rf "$icon" >/dev/null 2>&1