From 31989ccb350fb2a90dac3e7d311508e6334ec6df Mon Sep 17 00:00:00 2001 From: overdodactyl Date: Tue, 20 Nov 2018 15:12:49 -0700 Subject: [PATCH] updater.sh support for directories with spaces --- updater.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/updater.sh b/updater.sh index da9ff3e..56223da 100755 --- a/updater.sh +++ b/updater.sh @@ -279,12 +279,14 @@ add_override () { cat "$input" >> user.js echo -e "Status: ${GREEN}Override file appended:${NC} ${input}" elif [ -d "$input" ]; then - FILES="${input}/*" + FSAVEIFS=$IFS + IFS=$(echo -en "\n\b") # Set IFS + FILES="${input}"/* for f in $FILES - do - echo "$f" + do add_override "$f" done + IFS=$SAVEIFS # restore $IFS else echo -e "${ORANGE}Warning: Could not find override file:${NC} ${input}" fi