mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
feat: Adds functionality to use a json file for install or uninstall webapp scripts.
This commit is contained in:
13
env/.local/scripts/uninstall-webapp
vendored
13
env/.local/scripts/uninstall-webapp
vendored
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user