Merge pull request #4191 from HiassofT/le10-fix-obj-remove

allow packages to install *.o files into the image
This commit is contained in:
MilhouseVH
2020-02-13 17:26:09 +00:00
committed by GitHub
3 changed files with 12 additions and 11 deletions

View File

@@ -133,17 +133,17 @@ build_msg() {
# prints a warning if the file slated for removal doesn't exist
# this allows us to continue instead of bailing out with just "rm"
safe_remove() {
local path="$1"
local path
[ -z "${path}" ] && return 0
if [ -e "${path}" -o -L "${path}" ]; then
rm -r "${path}"
elif [ -n "${PKG_NAME}" ]; then
print_color CLR_WARNING "safe_remove: path does not exist: [${PKG_NAME}]: ${path}\n"
else
print_color CLR_WARNING "safe_remove: path does not exist: ${path}\n"
fi
for path in "$@" ; do
if [ -e "${path}" -o -L "${path}" ]; then
rm -r "${path}"
elif [ -n "${PKG_NAME}" ]; then
print_color CLR_WARNING "safe_remove: path does not exist: [${PKG_NAME}]: ${path}\n"
else
print_color CLR_WARNING "safe_remove: path does not exist: ${path}\n"
fi
done
}
### BUILDSYSTEM HELPERS ###