scripts: cleanup.sh: skip directory symlinks
authorJo-Philipp Wich <jo@mein.io>
Thu, 18 Jul 2019 13:02:11 +0000 (15:02 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 18 Jul 2019 13:02:11 +0000 (15:02 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
scripts/cleanup.sh

index dc47529cb65fc5621c8f99461af7f8c4b08196f7..87c08470a2e1e47a29527dd6dc0e44f9efd7aff0 100755 (executable)
@@ -66,7 +66,7 @@ if [ "$current_mode" = full ]; then
 
                build_dir="$(readlink -f "$build_dir")"
 
-               if [ -z "$build_dir" ] || [ ! -d "$build_dir/build" ]; then
+               if [ -z "$build_dir" ] || [ -L "$build_dir" ] || [ ! -d "$build_dir/build" ]; then
                        continue
                fi