Merge "Correct install check files"
authorLiam Fallon <liam.fallon@est.tech>
Tue, 25 Jun 2019 05:59:09 +0000 (05:59 +0000)
committerNordix Gerrit <gerrit@nordix.org>
Tue, 25 Jun 2019 05:59:09 +0000 (05:59 +0000)
onap-reviews/heis-clone.sh

index b1dfca1a4c76c05dbfc1ae522091a92e7118e33e..7c633ad59b00ff62cee49f568ce12683ece1059e 100755 (executable)
@@ -34,8 +34,12 @@ then
 fi
 
 git clone ssh://$1@gerrit.nordix.org:29418/$2 $3
-
 scp -p -P 29418 $1@gerrit.nordix.org:hooks/commit-msg $3/.git/hooks
-
 cd $3
+
+# Adding gerrit remote base on the origin URL to make sure the git review have
+# a correct project path for repositories on Nordix
+gerrit_remote=$(git remote -v | awk ' /^origin.*\(push\)/ { print $2 }')
+git remote add gerrit ${gerrit_remote}
+
 git checkout master