From: Jeffery To Date: Wed, 15 May 2019 14:20:17 +0000 (+0800) Subject: build: fix STAGING_DIR cleaning when filenames contain spaces X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3fcb70927597bad2896c6b39b2bdd2bb4c371bf3;p=openwrt%2Fstaging%2Fjogo.git build: fix STAGING_DIR cleaning when filenames contain spaces When looping through a package's STAGING_FILES_LIST (a list of file/directory paths delimited by newlines), if the path contains spaces, then the path will be split by the while loops, and the file/directory will not be deleted/removed. This sets the internal field separator to the newline only so that the entire path is considered when deleting/removing. Signed-off-by: Jeffery To --- diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh index e580566a52..6dd9bf7306 100755 --- a/scripts/clean-package.sh +++ b/scripts/clean-package.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +IFS=$'\n' [ -n "$1" -a -n "$2" ] || { echo "Usage: $0 " exit 1