MEDIA_PATH="Java Project"
for project in ${LIST}; do
- if [ ! -d "${JPROJECTS_HOME}/${project}" ]
+ if [ "${project}" = "jprojects-scripts" ]
then
+ echo "$0: Skipping jprojects-scripts ..."
+ continue
+ elif [ ! -d "${JPROJECTS_HOME}/${project}" ]
+ then
+ echo "$0: Project '${project}' does not exist."
continue
fi
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}'"
if [ -n "${UPSTREAM_REMOTE1}" ]
then
- echo "$0: Remote '${WANTED_NAME1}' found in '${project}'."
+ echo "$0: Wanted remote '${WANTED_NAME1}' already found in '${project}'."
else
echo "$0: No wanted '${WANTED_NAME1}' in '${project}'. Adding ..."
git remote add "${WANTED_NAME1}" "${GIT_URL1}" --track "${GIT_BRANCH}" || exit 255