From 0353ceca365d5d0b4fb50a2e2d92ccfc819a0e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 10 Sep 2012 17:18:23 +0200 Subject: git-synk: better current path management --- git-synk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-synk b/git-synk index 1819064..1883086 100755 --- a/git-synk +++ b/git-synk @@ -46,7 +46,7 @@ function success() { } function fail() { - echo -e "${RED}$1 ${RESET}${CYAN}leave${RESET}\n" && cd .. + echo -e "${RED}$1 ${RESET}${CYAN}leave${RESET}\n" } function search_remote() { @@ -96,6 +96,7 @@ echo -e "remote:${YELLOW}${GIT_REMOTE}${RESET}:${PURPLE}${GIT_BRANCH}${RESET} US for gitdir in ${GIT_DIR}; do echo -e "enter ${BROWN}${gitdir}${RESET}" && cd ${gitdir} || return 1 for dir in $(ls -1); do + cd ${gitdir} STASH=0 [ -d ${dir} ] && [ -e ${dir}/.git/config ] || continue echo -e " enter ${BROWN}${dir}${RESET}" && cd $dir || exit 1 @@ -104,7 +105,7 @@ for gitdir in ${GIT_DIR}; do gc || continue pull || continue push || continue - echo -e " leave ${BROWN}${dir}${RESET}\n" && cd .. + echo -e " leave ${BROWN}${dir}${RESET}\n" done echo -e "leave ${BROWN}${gitdir}${RESET}" done -- cgit v1.1-2-g2b99