fix on uninstall script with -r

This commit is contained in:
daniel0alves
2026-01-14 12:30:47 +00:00
parent 1c3c255ab6
commit 6afc4b1aa7
+9
View File
@@ -45,7 +45,12 @@ function delete_targets(){
printf "${STY_YELLOW}Target \"$path\" inexists, skipping...${STY_RST}\n"
continue
elif [[ "$path" == "$HOME"* ]]; then
if [[ -d "$path" ]]; then
x rm -r -- "$path"
else
x rm -- "$path"
fi
else
while true; do
printf "WARNING: Target \"$path\" is not under \$HOME. Still delete it?\ny=Yes, delete it;\nn=No, skip this one\n"
@@ -53,7 +58,11 @@ function delete_targets(){
echo
case "$ans" in
y|Y)
if [[ -d "$path" ]]; then
x rm -r -- "$path"
else
x rm -- "$path"
fi
break 1
;;
n|N)