about summary refs log tree commit diff stats
path: root/instantiate_templates.sh
diff options
context:
space:
mode:
Diffstat (limited to 'instantiate_templates.sh')
-rwxr-xr-xinstantiate_templates.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/instantiate_templates.sh b/instantiate_templates.sh
index eaffcb2..8b7b3e8 100755
--- a/instantiate_templates.sh
+++ b/instantiate_templates.sh
@@ -14,6 +14,8 @@ ROOT="$(git rev-parse --show-toplevel)"
 
 DRY_RUN_CMD=""
 
+# TODO: Find a way to do the building step incrementally (i.e. without removing everything) <2024-06-11>
+[ -n "$ROOT" ] && $DRY_RUN_CMD rm --recursive "$ROOT/build"
 $DRY_RUN_CMD mkdir --parents "$ROOT/build"
 
 fd . "$ROOT/templates" --max-depth 1 --type directory | while read -r template; do
@@ -31,11 +33,11 @@ fd . "$ROOT/templates" --max-depth 1 --type directory | while read -r template;
         symlink_path="$(readlink --canonicalize "$symlink")"
 
         if stringContain "$ROOT" "$symlink_path"; then
-            echo "Instantiating symlink: '.${symlink#"$ROOT"}'.."
+            echo "     -> Instantiating symlink: '.${symlink#"$ROOT"}'.."
             $DRY_RUN_CMD rm "$symlink"
             $DRY_RUN_CMD cp "$symlink_path" "$symlink"
         else
-            echo "Not instantiating symlink '.${symlink#"$ROOT"}', as it points outside the repo!"
+            echo "     -> Not instantiating symlink '.${symlink#"$ROOT"}', as it points outside the repo!"
         fi
     done
 done