mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-02 04:14:28 +07:00
feat(scripts): add script to replace GitOps repo
This commit is contained in:
parent
3a3ee0e9ea
commit
8f836e54e3
8
scripts/replace-gitops-repo
Executable file
8
scripts/replace-gitops-repo
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
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
|
||||
sed -i "s/${CURRENT_REPO}/${NEW_REPO}/g" $p
|
||||
done
|
Loading…
Reference in New Issue
Block a user