feat: Adds functionality to use a json file for install or uninstall webapp scripts.

This commit is contained in:
2025-09-28 18:57:56 -04:00
parent a05e8f41bd
commit 1a3442dee7
3 changed files with 46 additions and 12 deletions

View File

@@ -3,7 +3,18 @@
# Uninstall's a web app, including it's icon.
app_dir="$HOME/.local/share/applications"
file="$1"
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"