From caa7785f6c2962485f6e157bbbddde8f26d7bcce Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 30 Dec 2011 00:51:46 +0100 Subject: [PATCH] [scripts] mkloopcard.txt: do not use -e with patterns --- scripts/mkloopcard.txt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/mkloopcard.txt b/scripts/mkloopcard.txt index b080751..c04d0c5 100755 --- a/scripts/mkloopcard.txt +++ b/scripts/mkloopcard.txt @@ -141,19 +141,15 @@ echo "rc-update --update" | chroot "${tmp_dir}" if [ -n "${PATHS_TO_REMOVE}" ]; then for path in $(echo ${PATHS_TO_REMOVE} | tr ";" "\n"); do path="${tmp_dir}/${path}" - if [ -e "${path}" ]; then - echo "Removing: ${path}" - rm -rf "${path}" - fi + echo "Removing: ${path}" + rm -rf "${path}" done fi if [ -n "${PATHS_TO_EMPTY}" ]; then for path in $(echo ${PATHS_TO_EMPTY} | tr ";" "\n"); do path="${tmp_dir}/${path}" - if [ -d "${path}" ]; then - echo "Emptying: ${path}" - rm -rf "${path}"/* - fi + echo "Emptying: ${path}" + rm -rf "${path}"/* done fi