aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/clean-package.sh
Commit message (Collapse)AuthorAgeFilesLines
* build: Fix directory symlinks not removed when cleaning STAGING_DIRJeffery To2020-03-011-1/+1
| | | | | | | | | | | | | | | | | | Currently, a symbolic link whose target is a directory will not be removed when cleaning packages from STAGING_DIR. In the first cleaning pass in scripts/clean-package.sh, the -f test for a directory symlink returns false (because the link target is a directory) and so the symlink is not removed. In the second pass, the -d test returns true for a directory symlink, but the symlink is not removed by rmdir because rmdir only removes (real) directories. This updates clean-package.sh to remove all non-directories (including symbolic links) in the first pass. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
* build: fix STAGING_DIR cleaning when filenames contain spacesJeffery To2019-05-171-0/+1
| | | | | | | | | | | | 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>
* build: fix STAGING_DIR cleaning for packagesJeffery To2019-01-301-1/+1
| | | | | | | | | | | | | | | | 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>
* build: clean up stale files from a previous build when installing a package ↵Felix Fietkau2013-05-291-0/+24
build to the staging dir Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 36755