From 777e77ac9d3ecae21c73be031561c73804a1c8a9 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 15 Jan 2018 13:39:36 +0000 Subject: [PATCH] Cleanup any empty directories Signed-off-by: Michael Tremer --- server-scripts/ipfire-cleanup-nightly-builds.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server-scripts/ipfire-cleanup-nightly-builds.sh b/server-scripts/ipfire-cleanup-nightly-builds.sh index dcfc461..d54246c 100755 --- a/server-scripts/ipfire-cleanup-nightly-builds.sh +++ b/server-scripts/ipfire-cleanup-nightly-builds.sh @@ -55,6 +55,9 @@ for branch in $(find "${BASEDIR}" -mindepth 1 -maxdepth 1 -type d); do rm -rf "${build}" fi done <<< "$(find "${branch}" -mindepth 1 -maxdepth 1 -type d | sort -nr)" + + # Delete any empty directory + find "${branch}" -type d -empty -exec rmdir {} \; 2>/dev/null done exit 0 -- 2.47.3