From 10170052609846b4f29ae3d23244dcfe42d6aa3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Fri, 17 Jan 2020 15:54:52 +0100 Subject: [PATCH] make set-url configurable via environment --- bashrc_add | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashrc_add b/bashrc_add index 51fa336..10bf93e 100755 --- a/bashrc_add +++ b/bashrc_add @@ -169,7 +169,7 @@ if [[ $- = *i* ]] ; then $SGIT config user.name "${FULLNAME}" # set upstream only if not detached - [ $($SGIT rev-parse --abbrev-ref HEAD) != "HEAD" ] && $SGIT branch --set-upstream-to=origin/$($SGIT rev-parse --abbrev-ref HEAD) + [ $($SGIT rev-parse --abbrev-ref HEAD) != "HEAD" ] && $SGIT branch --set-upstream-to=${MYSHELLCONFIG_GIT_REMOTE_NAME}/$($SGIT rev-parse --abbrev-ref HEAD) # sync repo with origin if git is reachable if ckrepo ; then @@ -213,7 +213,7 @@ if [[ $- = *i* ]] ; then #echo "Run Vim, and in Vim run :PluginInstall to install all Plugins" vim -c "PluginInstall" -c ":qa!" fi - [ -z ${MYSHELLCONFIG_GIT_REMOTE_PUSH+x} ] || $SGIT remote set-url --push origin "${MYSHELLCONFIG_GIT_REMOTE_PUSH}" + [ -z ${MYSHELLCONFIG_GIT_REMOTE_PUSH+x} ] || $SGIT remote set-url --push ${MYSHELLCONFIG_GIT_REMOTE_NAME} "${MYSHELLCONFIG_GIT_REMOTE_PUSH}" # cd ${HOME} ;; *screen*)