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
+4 -4
View File
@@ -5,7 +5,7 @@
NO_SUDO=false
PRINT_ONLY=false
while [[ $# -gt 0 ]]; do
while (( $# > 0 )); do
case "$1" in
--no-sudo)
NO_SUDO=true
@@ -25,7 +25,7 @@ done
LOG_FILE="/tmp/omarchy-debug.log"
if [ "$NO_SUDO" = true ]; then
if [[ $NO_SUDO = "true" ]]; then
DMESG_OUTPUT="(skipped - --no-sudo flag used)"
else
DMESG_OUTPUT="$(sudo dmesg)"
@@ -57,7 +57,7 @@ INSTALLED PACKAGES
$({ expac -S '%n %v (%r)' $(pacman -Qqe) 2>/dev/null; comm -13 <(pacman -Sql | sort) <(pacman -Qqe | sort) | xargs -r expac -Q '%n %v (AUR)'; } | sort)
EOF
if [ "$PRINT_ONLY" = true ]; then
if [[ $PRINT_ONLY = "true" ]]; then
cat "$LOG_FILE"
exit 0
fi
@@ -73,7 +73,7 @@ case "$ACTION" in
"Upload log")
echo "Uploading debug log to 0x0.st..."
URL=$(curl -sF "file=@$LOG_FILE" -Fexpires=24 https://0x0.st)
if [ $? -eq 0 ] && [ -n "$URL" ]; then
if (( $? == 0 )) && [[ -n $URL ]]; then
echo "✓ Log uploaded successfully!"
echo "Share this URL:"
echo ""