--- smage/trunk/include/alx-split.sminc 2013/05/07 13:01:42 4818 +++ smage/trunk/include/alx-split.sminc 2015/03/19 10:08:35 6001 @@ -117,12 +117,19 @@ *\**|*\\\**) if [[ -e \${BINDIR}/\$(dirname \${i}) ]] then + echo find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm fi ;; *) if [[ -e \${BINDIR}/\${i} ]] then + echo rm -r \${BINDIR}/\${i} + rm -r \${BINDIR}/\${i} || die + # busybox does not detect symlinks with -e if the reference does not exists + elif [[ -L \${BINDIR}/\${i} ]] + then + echo rm -r \${BINDIR}/\${i} rm -r \${BINDIR}/\${i} || die fi ;; @@ -168,12 +175,19 @@ *\**|*\\\**) if [[ -e \${BINDIR}/\$(dirname \${i}) ]] then + echo find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm fi ;; *) if [[ -e \${BINDIR}/\${i} ]] then + echo rm -r \${BINDIR}/\${i} + rm -r \${BINDIR}/\${i} || die + # busybox does not detect symlinks with -e if the reference does not exists + elif [[ -L \${BINDIR}/\${i} ]] + then + echo rm -r \${BINDIR}/\${i} rm -r \${BINDIR}/\${i} || die fi ;;