From d01431a9559f2c14702c948cca26dbd9ca19d170 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 31 May 2016 21:02:13 +0200 Subject: [PATCH] Added support for creating all repositories on Linux/Uni*. Signed-off-by: Roland Haeder --- fix-project-remotes.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fix-project-remotes.sh b/fix-project-remotes.sh index 1c75ff3..f4bd38b 100755 --- a/fix-project-remotes.sh +++ b/fix-project-remotes.sh @@ -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}'" -- 2.39.5