summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-09-10 17:18:23 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-09-10 17:18:23 +0200
commit0353ceca365d5d0b4fb50a2e2d92ccfc819a0e8a (patch)
tree366f88e895a5d45900fec5d6f2d0103e96f0607b
parent8ff1987ecc74e2edc8361a9985c590ff62ce0b30 (diff)
downloadbin-0353ceca365d5d0b4fb50a2e2d92ccfc819a0e8a.zip
bin-0353ceca365d5d0b4fb50a2e2d92ccfc819a0e8a.tar.gz
git-synk: better current path management
-rwxr-xr-xgit-synk5
1 files 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