refactor(scripts): only replace repo and domain where needed

This commit is contained in:
Khue Doan 2022-01-16 21:57:10 +07:00
parent 40523e64ab
commit 66d84c274d
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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