From 399d71808ac381770e1b45475ea21f5d59d02a83 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sun, 10 May 2026 02:42:35 -0400 Subject: [PATCH] bootstrap .bashrc_local and .bashrc_paths from example if missing --- setup_env.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setup_env.sh b/setup_env.sh index 211417e..fe39a14 100755 --- a/setup_env.sh +++ b/setup_env.sh @@ -60,9 +60,14 @@ migrate_and_link() { local target=$1 local link_name=$2 - if [[ ! -e "$target" && -f "$link_name" && ! -L "$link_name" ]]; then - echo "Migrating existing $link_name -> $target" - cp "$link_name" "$target" + if [[ ! -e "$target" ]]; then + if [[ -f "$link_name" && ! -L "$link_name" ]]; then + echo "Migrating existing $link_name -> $target" + cp "$link_name" "$target" + elif [[ -f "${target}_example" ]]; then + echo "Bootstrapping $target from example (fill in real values)" + cp "${target}_example" "$target" + fi fi create_symlink "$target" "$link_name"