Skip to content

Instantly share code, notes, and snippets.

@hiono
Last active January 3, 2016 10:49
Show Gist options
  • Save hiono/8451642 to your computer and use it in GitHub Desktop.
Save hiono/8451642 to your computer and use it in GitHub Desktop.
SHLVL が 1 の時だけgit pullを巡回。ログイン時に回すのに使う。
#!/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