]> git.mxchange.org Git - jprojects-scripts.git/commitdiff
A bit more stuff:
authorRoland Haeder <roland@mxchange.org>
Wed, 11 May 2016 18:40:18 +0000 (20:40 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 11 May 2016 18:42:32 +0000 (20:42 +0200)
- now it jlandingpage is added
- ignored missing "ant" program.
- added fixing "Linux USB stick"-only projects

Signed-off-by: Roland Haeder <roland@mxchange.org>
.jprojects.sh
fix-project-remotes.sh

index a8e43f79363e2d384f3965dfc714f70dfea08b0a..08d1faf3e90b238386c31c73895b569a3c63374c 100644 (file)
@@ -25,6 +25,7 @@ LIST="${LIST}
        jjobs-core jjobs-lib jjobs-mailer jjobs-ejb jjobs-war jjobs \
        jrecruiter-core jrecruiter-lib jrecruiter-mailer jrecruiter-ejb jrecruiter-war jrecruiter \
        jratecalc-core jratecalc-lib jratecalc-mailer jratecalc-ejb jratecalc-war jratecalc \
+       jlandingpage-core jlandingpage-lib jlandingpage-mailer jlandingpage-ejb jlandingpage-war jlandingpage \
        addressbook-core addressbook-lib addressbook-mailer addressbook-ejb addressbook-war addressbook addressbook-uml"
 
 # BROKEN:
@@ -34,7 +35,7 @@ LIST="${LIST} addressbook-swing pizzaservice-war pizzaservice"
 declare -r JPROJECTS_HOME="${PWD}"
 
 # ant binary
-ANT_BIN=`which ant`
+ANT_BIN=`which ant 2>/dev/null`
 
 # Test on .git availability"
 for project in ${LIST}; do
index cd51a97f8be1fe157e7aa3bf44d2449d56b6129f..1c75ff351eb85e81dca5c10149b1a88da89a41aa 100755 (executable)
@@ -31,7 +31,8 @@ for project in ${LIST}; do
        GIT_URL3="${MEDIA_BASE}/${USER}/${MEDIA_NAME2}/${MEDIA_PATH}/${project}.git"
        GIT_URL4="file:///E:/Java%20Project/${project}.git"
        GIT_URL5="E:/Java Project/${project}.git"
-       echo "$0: GIT_URL1='${GIT_URL1}',GIT_URL2='${GIT_URL2}',GIT_URL3='${GIT_URL3}',GIT_URL4='${GIT_URL4}',GIT_URL5='${GIT_URL5}'"
+       GIT_URL6="${MEDIA_BASE}/${USER}/${MEDIA_NAME1}/${MEDIA_PATH}/${project}.git"
+       echo "$0: GIT_URL1='${GIT_URL1}',GIT_URL2='${GIT_URL2}',GIT_URL3='${GIT_URL3}',GIT_URL4='${GIT_URL4}',GIT_URL5='${GIT_URL5}',GIT_URL6='${GIT_URL6}'"
 
        cd "${JPROJECTS_HOME}/${project}" || exit 255
 
@@ -69,9 +70,10 @@ for project in ${LIST}; do
                else
                        echo "$0: Not a media remote."
                        MXCHANGE_REMOTE=`echo "${REMOTE_PUSH}" | grep "${GIT_URL1}"`
+                       LINUX_MEDIA_PATH_REMOTE=`echo "${REMOTE_PUSH}" | grep "${GIT_URL3}"`
                        WINDOWS_FILE_REMOTE=`echo "${REMOTE_PUSH}" | grep "${GIT_URL4}"`
                        WINDOWS_PATH_REMOTE=`echo "${REMOTE_PUSH}" | grep "${GIT_URL5}"`
-                       echo "$0: MXCHANGE_REMOTE='${MXCHANGE_REMOTE}',WINDOWS_FILE_REMOTE='${WINDOWS_FILE_REMOTE}',WINDOWS_PATH_REMOTE='${WINDOWS_PATH_REMOTE}'"
+                       echo "$0: MXCHANGE_REMOTE='${MXCHANGE_REMOTE}',WINDOWS_FILE_REMOTE='${WINDOWS_FILE_REMOTE}',WINDOWS_PATH_REMOTE='${WINDOWS_PATH_REMOTE}',LINUX_MEDIA_PATH_REMOTE='${LINUX_MEDIA_PATH_REMOTE}'"
 
                        if [ -n "${MXCHANGE_REMOTE}" ]
                        then
@@ -101,6 +103,21 @@ for project in ${LIST}; do
 
                                echo "$0: Adding '${GIT_ORIGIN}' to '${project}' ..."
                                git remote add "${GIT_ORIGIN}" "${GIT_URL1}" --track "${GIT_BRANCH}" || exit 255
+                       elif [ -n "${LINUX_MEDIA_PATH_REMOTE}" ]
+                       then
+                               echo "$0: Found a Linux (USB stick) remote."
+
+                               if [ -n "${GIT_ORIGIN}" -a "${REMOTE}" = "${GIT_ORIGIN}" ]
+                               then
+                                       echo "$0: Need to fix remote repositories ..."
+                                       git remote rename origin transport || exit 255
+                                       git remote add "${GIT_ORIGIN}" "${GIT_URL6}" --track "${GIT_BRANCH}" || exit 255
+                                       git remote add "${WANTED_NAME1}" "${GIT_URL1}" --track "${GIT_BRANCH}" || exit 255
+                                       git remote add "${WANTED_NAME2}" "${GIT_URL2}" --track "${GIT_BRANCH}" || exit 255
+                               else
+                                       echo "$0: Don't know how to fix '${REMOTE}' (${REMOTE_PUSH})."
+                                       exit 1
+                               fi
                        else
                                echo "$0: Unknown remote '${REMOTE_PUSH}' found. Exiting ..."
                                exit 1