Enforce clone URL when repo is already checked out
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9d1896bb23
commit
5f39869bb9
1 changed files with 2 additions and 0 deletions
|
@ -53,6 +53,8 @@ for repo_name in "${!REPOS[@]}"; do
|
||||||
# Clone repo if it's not already available
|
# Clone repo if it's not already available
|
||||||
if ! [ -d "${HOME}/.cfg/${repo_name}" ]; then
|
if ! [ -d "${HOME}/.cfg/${repo_name}" ]; then
|
||||||
git clone --bare "${clone_url}" --branch "${branch}" "${HOME}/.cfg/${repo_name}"
|
git clone --bare "${clone_url}" --branch "${branch}" "${HOME}/.cfg/${repo_name}"
|
||||||
|
else
|
||||||
|
config remote set-url origin "${clone_url}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set basic git options for the repo
|
# Set basic git options for the repo
|
||||||
|
|
Loading…
Reference in a new issue