summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-06-18 12:13:37 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-06-18 12:13:37 (EDT)
commit5656adc87b0b1c43a169a0865caa7abdefb638f0 (patch)
tree3dc87c7f5f05bdd47d315cf22f5c4279026d9db5
parent09a968aeffda6fe17fca07474699cfc39ce77472 (diff)
build: Improve empty directory removal.
-rwxr-xr-xbuild9
1 files changed, 7 insertions, 2 deletions
diff --git a/build b/build
index a9fbab4..6ff6cda 100755
--- a/build
+++ b/build
@@ -106,8 +106,13 @@ install: build
-exec rm -f '{}' ';' && \
find "binutils-$${target}.data/usr/lib" -name '*.la' \
-exec rm -f '{}' ';' && \
- rmdir "binutils-$${target}.data/usr/lib/lib" || \
- exit 1; \
+ for dir in "binutils-$${target}.data/usr/lib/"*/; do \
+ case "$${dir}" in \
+ '$(OPK_HOST_ARCH)') ;; \
+ "$${target}") ;; \
+ *) rmdir "$${dir}" ;; \
+ esac; \
+ done; \
done
# Make symbolic links to native utilities.
for target in $$(cat ../targets); do \