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
@@ -1,13 +1,13 @@
#!/bin/bash
if [ ! -d "/usr/lib/modules/$(uname -r)" ]; then
if [[ ! -d /usr/lib/modules/$(uname -r) ]]; then
gum confirm "Linux kernel has been updated. Reboot?" && omarchy-cmd-reboot
elif [ -f "$HOME/.local/state/omarchy/reboot-required" ]; then
elif [[ -f $HOME/.local/state/omarchy/reboot-required ]]; then
gum confirm "Updates require reboot. Ready?" && omarchy-cmd-reboot
fi
for file in "$HOME"/.local/state/omarchy/restart-*-required; do
if [ -f "$file" ]; then
if [[ -f $file ]]; then
filename=$(basename "$file")
service=$(echo "$filename" | sed 's/restart-\(.*\)-required/\1/')
echo "Restarting $service"