diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-09-10 17:18:23 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-09-10 17:18:23 +0200 |
commit | 0353ceca365d5d0b4fb50a2e2d92ccfc819a0e8a (patch) | |
tree | 366f88e895a5d45900fec5d6f2d0103e96f0607b | |
parent | 8ff1987ecc74e2edc8361a9985c590ff62ce0b30 (diff) | |
download | bin-0353ceca365d5d0b4fb50a2e2d92ccfc819a0e8a.zip bin-0353ceca365d5d0b4fb50a2e2d92ccfc819a0e8a.tar.gz |
git-synk: better current path management
-rwxr-xr-x | git-synk | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |