diff options
author | Jeffery To <jeffery.to@gmail.com> | 2018-12-13 01:33:36 +0800 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-01-30 12:32:07 +0100 |
commit | a1170936798e519776de605d6986ccb72f04cb06 (patch) | |
tree | e7dce9b0785f28b50dd45ffbfac33b6050fc22a0 /scripts | |
parent | ed514e7f9ecc557fdddf2e22f3ad372affc1999b (diff) | |
download | upstream-a1170936798e519776de605d6986ccb72f04cb06.tar.gz upstream-a1170936798e519776de605d6986ccb72f04cb06.tar.bz2 upstream-a1170936798e519776de605d6986ccb72f04cb06.zip |
build: fix STAGING_DIR cleaning for packages
This fixes two issues with cleaning package files from STAGING_DIR:
* CleanStaging currently can only remove files and not directories. This
changes CleanStaging to use clean-package.sh, which does remove
directories.
* Because of the way directories are ordered in the staging files list,
clean-package.sh currently tries (and fails) to remove parent
directories before removing subdirectories. This changes
clean-package.sh to process the staging files list in reverse, so that
subdirectories are removed first.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/clean-package.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/clean-package.sh b/scripts/clean-package.sh index d1a257889d..e580566a52 100755 --- a/scripts/clean-package.sh +++ b/scripts/clean-package.sh @@ -14,7 +14,7 @@ cat "$1" | ( [ -f "$entry" ] && rm -f $entry done ) -cat "$1" | ( +sort -r "$1" | ( cd "$2" while read entry; do [ -n "$entry" ] || break |