osmith submitted this change.
contrib/jenkins.sh: set-url for existing clones
Make sure that the recent change from git.osmocom.org ->
gerrit.osmocom.org for git clone urls is applied to the existing clones
as well.
Change-Id: I3d9c193bf353ecff0ee8bb4c507de59139fc0925
---
M contrib/jenkins.sh
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 6512af9..96becc7 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -5,7 +5,18 @@
# Clone repository to ~/, or update existing
# $1: name of osmocom project
clone_repo() {
- cd ~/"$1" || (cd ~/ && git clone https://gerrit.osmocom.org/"$1" && cd ~/"$1")
+ local project="$1"
+ local url="https://gerrit.osmocom.org/$project"
+
+ if [ -d ~/"$project" ]; then
+ cd ~/"$project"
+ git remote set-url origin "$url"
+ else
+ cd ~
+ git clone "$url"
+ cd "$project"
+ fi
+
git rev-parse HEAD
git status
To view, visit change 29774. To unsubscribe, or for help writing mail filters, visit settings.