Last active
January 3, 2016 10:49
-
-
Save hiono/8451642 to your computer and use it in GitHub Desktop.
SHLVL が 1 の時だけgit pullを巡回。ログイン時に回すのに使う。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
if [ ${SHLVL} -le 1 ];then | |
if [ -f ~/.gitupdates ];then | |
for i in $(cat ~/.gitupdates ) | |
do | |
pushd $(eval "ls -d $i") | |
git pull -v || echo ERROR !!!!!!!!!!!!!!!!!!! | |
popd > /dev/null | |
done | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment