]> git.mxchange.org Git - jprojects-scripts.git/commitdiff
Added support for creating all repositories on Linux/Uni*.
authorRoland Haeder <roland@mxchange.org>
Tue, 31 May 2016 19:02:13 +0000 (21:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 31 May 2016 19:02:13 +0000 (21:02 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
fix-project-remotes.sh

index 1c75ff351eb85e81dca5c10149b1a88da89a41aa..f4bd38bf05d3c4f746037cd20965f97ed7338228 100755 (executable)
@@ -46,7 +46,20 @@ for project in ${LIST}; do
        REMOTES=`git remote | wc -l`
        echo "$0: REMOTES='${REMOTES}'"
 
-       if [ "${REMOTES}" = "1" ]
+       if [ "${REMOTES}" = "0" ]
+       then
+               if [ -n "${SHELL}" -a -f "/proc/version" ]
+               then
+                       echo "$0: Found no repositories in '${project}'. Creating all (Linux) ..."
+                       git remote add "${GIT_ORIGIN}" "${GIT_URL6}" --track "${GIT_BRANCH}"
+                       git remote add "${WANTED_NAME1}" "${GIT_URL1}"
+                       git remote add "${WANTED_NAME2}" "${GIT_URL2}"
+                       git remote add "${WANTED_NAME3}" "${GIT_URL3}"
+               else
+                       echo "$0: Don't know how to create repositories, maybe unsupported."
+                       exit 1
+               fi
+       elif [ "${REMOTES}" = "1" ]
        then
                echo "$0: Only one remote found for '${project}'"