From 5656adc87b0b1c43a169a0865caa7abdefb638f0 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 18 Jun 2013 12:13:37 -0400 Subject: build: Improve empty directory removal. --- (limited to 'build') 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 \ -- cgit v0.9.1