Skip to content

Commit 131307e

Browse files
committed
fix: Shell script lint issue
1 parent cb18b17 commit 131307e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

uninstall.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,15 @@ remove_configs() {
111111
# Remove draphyOS wallpaper only (not user's wallpaper)
112112
# Check if it's the draphyOS wallpaper before removing
113113
if [ -f "$HOME/.config/wallpaper.png" ]; then
114-
# Only remove if it matches draphyOS wallpaper (by checking if backup exists)
115-
if [ ! -f "$HOME/.config-backup-"*"/wallpaper.png" ] 2>/dev/null; then
114+
# Only remove if no backup exists (meaning it's draphyOS wallpaper)
115+
local has_backup=false
116+
for backup_wp in "$HOME"/.config-backup-*/wallpaper.png; do
117+
if [ -f "$backup_wp" ]; then
118+
has_backup=true
119+
break
120+
fi
121+
done
122+
if [ "$has_backup" = false ]; then
116123
rm -f "$HOME/.config/wallpaper.png" 2>/dev/null || true
117124
fi
118125
fi

0 commit comments

Comments
 (0)