From: Michael Tremer Date: Mon, 15 Jan 2018 13:39:36 +0000 (+0000) Subject: Cleanup any empty directories X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=777e77ac9d3ecae21c73be031561c73804a1c8a9;p=people%2Fms%2Fnightly-builds.git Cleanup any empty directories Signed-off-by: Michael Tremer --- 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