diff --git a/install.sh b/install.sh index 6b0eec1..fdf4d4d 100755 --- a/install.sh +++ b/install.sh @@ -197,7 +197,12 @@ done say " copied $copied, skipped $skipped (already present)" # --- copy template --------------------------------------------------------- -if compgen -G "$KIT_DIR/_templates/*.template" >/dev/null; then +# bash-3.2-portable glob detection: iterate, break on first hit. +has_templates=0 +for t in "$KIT_DIR/_templates/"*.template; do + [ -f "$t" ] && { has_templates=1; break; } +done +if [ "$has_templates" = "1" ]; then say "copying specialist template" backup_dir "$AGENTS_DIR/_templates" cp -f "$KIT_DIR/_templates/"*.template "$AGENTS_DIR/_templates/"