Use consistent bash5 style for conditionals and quoting

This commit is contained in:
David Heinemeier Hansson
2026-02-21 10:18:47 +01:00
parent d2acf3b6ba
commit 7514ae7dcf
113 changed files with 289 additions and 287 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ set -e
ICON_DIR="$HOME/.local/share/applications/icons"
DESKTOP_DIR="$HOME/.local/share/applications/"
if [ "$#" -eq 0 ]; then
if (( $# == 0 )); then
# Find all web apps
while IFS= read -r -d '' file; do
if grep -q '^Exec=.*\(omarchy-launch-webapp\|omarchy-webapp-handler\).*' "$file"; then
@@ -20,7 +20,7 @@ if [ "$#" -eq 0 ]; then
# Convert newline-separated string to array
APP_NAMES=()
while IFS= read -r line; do
[[ -n "$line" ]] && APP_NAMES+=("$line")
[[ -n $line ]] && APP_NAMES+=("$line")
done <<< "$APP_NAMES_STRING"
else
echo "No web apps to remove."
@@ -31,7 +31,7 @@ else
APP_NAMES=("$@")
fi
if [[ ${#APP_NAMES[@]} -eq 0 ]]; then
if (( ${#APP_NAMES[@]} == 0 )); then
echo "You must select at least one web app to remove."
exit 1
fi