Fix autoupdate directory change problem

This commit is contained in:
lhark 2016-06-30 01:57:34 +02:00
parent 47d0e62b3a
commit 042334b530

6
zshrc
View file

@ -18,7 +18,7 @@ RC_PATH=$(dirname "$(readlink -f ${(%):-%x})")
# Mise à jour automatique à partir du repo distant # Mise à jour automatique à partir du repo distant
PWD=`pwd` CUR_DIR=`pwd`
cd $RC_PATH cd $RC_PATH
# In case the network is down, don't lock the terminal # In case the network is down, don't lock the terminal
@ -39,13 +39,13 @@ elif $(echo "$git_st" | grep '^## .*behind' &> /dev/null); then
if [ "$line" = Y ] || [ "$line" = y ]; then if [ "$line" = Y ] || [ "$line" = y ]; then
git pull --rebase --stat origin master git pull --rebase --stat origin master
$RC_PATH/install.sh $RC_PATH/install.sh
cd $PWD cd $CUR_DIR
source $HOME/.zshrc source $HOME/.zshrc
return return
fi fi
fi fi
cd $PWD cd $CUR_DIR
# Configuration for virtualenv # Configuration for virtualenv