From 66d84c274d76978fe4157c0a465527f3ba74eb94 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Sun, 16 Jan 2022 21:57:10 +0700 Subject: [PATCH] refactor(scripts): only replace repo and domain where needed --- scripts/replace-domain | 2 +- scripts/replace-gitops-repo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/replace-domain b/scripts/replace-domain index 2237265b..80809e74 100755 --- a/scripts/replace-domain +++ b/scripts/replace-domain @@ -2,6 +2,6 @@ CURRENT_DOMAIN="khuedoan.com" -git grep "${CURRENT_DOMAIN}" -- apps platform system scripts | cut -d ':' -f1 | uniq | while read p; do +git grep "${CURRENT_DOMAIN}" -- bootstrap system platform apps | cut -d ':' -f1 | uniq | while read p; do sed -i "s/${CURRENT_DOMAIN}/${1}/g" $p done diff --git a/scripts/replace-gitops-repo b/scripts/replace-gitops-repo index bebd48a1..82e94c1a 100755 --- a/scripts/replace-gitops-repo +++ b/scripts/replace-gitops-repo @@ -3,6 +3,6 @@ CURRENT_REPO=$(echo 'github.com/khuedoan/homelab' | sed 's/\([.,/]\)/\\\1/g') NEW_REPO=$(echo "${1}" | sed 's/\([.,/]\)/\\\1/g') -git grep "${CURRENT_REPO}" | cut -d ':' -f1 | uniq | while read p; do +git grep "${CURRENT_REPO}" -- bootstrap platform | cut -d ':' -f1 | uniq | while read p; do sed -i "s/${CURRENT_REPO}/${NEW_REPO}/g" $p done