aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas C. Villa Real <lucasvr@gobolinux.org>2018-07-04 20:48:19 -0300
committerLucas C. Villa Real <lucasvr@gobolinux.org>2018-07-04 20:48:19 -0300
commit5527557baeb25f610d0796de263ea4ac841658ef (patch)
treeb496dc4fe5b3229d1e0a421aee4bceea56384971
parent5592e7ee2fc33ae6522dc0c25b05ece2e0433828 (diff)
downloadThirdPartyInstallers-5527557baeb25f610d0796de263ea4ac841658ef.tar.xz
Prune empty top-level directories and symlinks
-rwxr-xr-xbin/ThirdPartyInstaller7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ThirdPartyInstaller b/bin/ThirdPartyInstaller
index 3bb89b6..f714f67b 100755
--- a/bin/ThirdPartyInstaller
+++ b/bin/ThirdPartyInstaller
@@ -137,6 +137,13 @@ function flatten_package() {
done
}
+ # Prune empty top-level directories and symlinks
+ rmdir ${verbose} * 2> /dev/null
+ for linkname in bin sbin lib lib64
+ do
+ [ -L "$linkname" ] && rm ${verbose} -f "$linkname"
+ done
+
if [ -d "./usr" ]
then
remove_links_to_opt "./usr"