=================================================================== RCS file: /cvs/openbsd/fw_update/fw_install.sh,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- openbsd/fw_update/fw_install.sh 2021/10/16 19:42:43 1.9 +++ openbsd/fw_update/fw_install.sh 2021/10/17 03:05:29 1.10 @@ -177,7 +177,7 @@ echo "Uninstalling $installed" cwd=${PKGDIR}/$installed - remove="${cwd}/+CONTENTS ${cwd}" + set -A _remove -- "${cwd}/+CONTENTS" "${cwd}" while read c g; do case $c in @@ -185,18 +185,18 @@ ;; @*) continue ;; - *) remove="$cwd/$c $remove" + *) set -A _remove -- "$cwd/$c" "${_remove[@]}" ;; esac done < "${PKGDIR}/$installed/+CONTENTS" - for r in $remove ; do - if [ -d "$r" ]; then + for _r in "${_remove[@]}"; do + if [ -d "$_r" ]; then # Try hard not to actually remove recursively # without rmdir on the install media. - [ "$r/*" = $( echo "$r"/* ) ] && rm -rf "$r" + [ "$_r/*" = $( echo "$_r"/* ) ] && rm -rf "$_r" else - rm -f "$r" + rm -f "$_r" fi done fi