diff options
author | P. 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) |
commit | 5656adc87b0b1c43a169a0865caa7abdefb638f0 (patch) | |
tree | 3dc87c7f5f05bdd47d315cf22f5c4279026d9db5 | |
parent | 09a968aeffda6fe17fca07474699cfc39ce77472 (diff) |
build: Improve empty directory removal.
-rwxr-xr-x | build | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 \ |