X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fauto-update.sh;h=899f919c5cbc1a6b745b5da23b48ec8ee4203257;hb=a8aa1baef6f4d1df60f44d1d542912acff913226;hp=f2736b3ea03edd5d7df2011f44967baa219e8424;hpb=fbee4f34edb4ac58243f4221b1e19a820101a785;p=infrastructure.git diff --git a/scripts/auto-update.sh b/scripts/auto-update.sh index f2736b3..899f919 100755 --- a/scripts/auto-update.sh +++ b/scripts/auto-update.sh @@ -3,11 +3,12 @@ function _svn_or_git () { where="$1"; [ -z "$where" ] && where="." - cd $where + pushd $where >& /dev/null + cd $(pwd -P) while true; do - [ -d .svn ] && { echo svn ; return ; } - [ -d .git ] && { echo git ; return ; } - [ "$(pwd -P)" == "/" ] && { echo none ; return ; } + [ -d .svn ] && { popd >& /dev/null; echo svn ; return ; } + [ -d .git ] && { popd >& /dev/null; echo git ; return ; } + [ "$(pwd -P)" == "/" ] && { popd >& /dev/null; echo none ; return ; } cd .. done }