diff --git a/scripts/mkloopcard.txt b/scripts/mkloopcard.txt index 8755462..8990685 100755 --- a/scripts/mkloopcard.txt +++ b/scripts/mkloopcard.txt @@ -138,10 +138,8 @@ echo "rc-update add sshd default" | chroot "${tmp_dir}" echo "rc-update add net.eth0 default" | chroot "${tmp_dir}" # work out paths to empty and paths to remove -oldifs="${IFS}" -IFS=";" if [ -n "${PATHS_TO_REMOVE}" ]; then - for path in ${PATHS_TO_REMOVE}; do + for path in $(echo ${PATHS_TO_REMOVE} | tr ";" "\n"); do path="${tmp_dir}/${path}" if [ -e "${path}" ]; then echo "Removing: ${path}" @@ -150,7 +148,7 @@ if [ -n "${PATHS_TO_REMOVE}" ]; then done fi if [ -n "${PATHS_TO_EMPTY}" ]; then - for path in ${PATHS_TO_EMPTY}; do + for path in $(echo ${PATHS_TO_EMPTY} | tr ";" "\n"); do path="${tmp_dir}/${path}" if [ -d "${path}" ]; then echo "Emptying: ${path}" @@ -158,7 +156,6 @@ if [ -n "${PATHS_TO_EMPTY}" ]; then fi done fi -IFS="${oldifs}" if [ -n "${RELEASE_FILE}" ]; then release_file="${tmp_dir}"/"${RELEASE_FILE}"