diff options
author | Jeffery To <jeffery.to@gmail.com> | 2019-05-15 22:20:17 +0800 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-05-17 21:41:43 +0200 |
commit | 3fcb70927597bad2896c6b39b2bdd2bb4c371bf3 (patch) | |
tree | adc352f124ee7de93841204aadb6d3fd1197e633 /scripts/clean-package.sh | |
parent | fc553c7e4c8eea898aaa2086574b7e8737f6d26c (diff) | |
download | upstream-3fcb70927597bad2896c6b39b2bdd2bb4c371bf3.tar.gz upstream-3fcb70927597bad2896c6b39b2bdd2bb4c371bf3.tar.bz2 upstream-3fcb70927597bad2896c6b39b2bdd2bb4c371bf3.zip |
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 <jeffery.to@gmail.com>
Diffstat (limited to 'scripts/clean-package.sh')
-rwxr-xr-x | scripts/clean-package.sh | 1 |
1 files changed, 1 insertions, 0 deletions
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 <file> <directory>" exit 1 |