. ./.jprojects.sh || exit 255
UNWANTED_NAME1="stick"
-UNWANTED_NAME2="jtrainings"
+UNWANTED_NAME2="jjobboards"
WANTED_NAME1="upstream"
WANTED_NAME2="daedalus"
WANTED_NAME3="transport"
if [ -n "${UNWANTED_REMOTE}" ]
then
- echo "$0: Found remote '${UNWANTED_NAME2}' in '${project}'. Renaming '${GIT_ORIGIN}'->'${WANTED_NAME1}' and '${UNWANTED_NAME2}'->'${GIT_ORIGIN}' ..."
+ echo "$0: Found remote '${UNWANTED_NAME2}' in '${project}'. Removing it..."
- UPSTREAM_REMOTE=$(git remote | grep "${WANTED_NAME1}")
- echo "$0: UPSTREAM_REMOTE='${UPSTREAM_REMOTE}'"
-
- if [ -n "${UPSTREAM_REMOTE}" ]
- then
- echo "$0: Remotes '${UNWANTED_NAME2}' and '${WANTED_NAME1}' exist! Removing '${WANTED_NAME1}' ..."
- git remote rm "${WANTED_NAME1}" || exit 255
- fi
-
- git remote rename "${GIT_ORIGIN}" "${WANTED_NAME1}" || exit 255
- git remote rename "${UNWANTED_NAME2}" "${GIT_ORIGIN}" || exit 255
+ git remote remove "${UNWANTED_REMOTE}" || exit 255
else
echo "$0: No unwanted '${UNWANTED_NAME2}' remote in '${project}' ..."
UPSTREAM_REMOTE1=$(git remote | grep "${WANTED_NAME1}")