Enforce clone URL when repo is already checked out

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-08-25 17:44:55 +02:00
parent 9d1896bb23
commit 5f39869bb9
Signed by: luzifer
GPG Key ID: D91C3E91E4CAD6F5

View File

@ -53,6 +53,8 @@ for repo_name in "${!REPOS[@]}"; do
# Clone repo if it's not already available
if ! [ -d "${HOME}/.cfg/${repo_name}" ]; then
git clone --bare "${clone_url}" --branch "${branch}" "${HOME}/.cfg/${repo_name}"
else
config remote set-url origin "${clone_url}"
fi
# Set basic git options for the repo