From be4033f2f6cad0a7aaf3c2fd09646fb1c17f44c0 Mon Sep 17 00:00:00 2001 From: Reshetnikov_AS Date: Sun, 3 Mar 2024 02:13:12 +0400 Subject: [PATCH] cleanup empty dirs --- update.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update.sh b/update.sh index 03d6b72e..f8f7a6f1 100755 --- a/update.sh +++ b/update.sh @@ -38,6 +38,9 @@ if [[ ! -z "$target_path" ]]; then rm -f "$dp0/$orphaned_file" done + echo "Removing empty directories" + find "$dp0" -type d -mindepth 1 -maxdepth 1 -exec rmdir -p --ignore-fail-on-non-empty "{}" \; + echo "Update complete: $(cat $target_path/_$self_name/version.txt)" exit 0 fi