git auto pull

This commit is contained in:
Frank Villaro-Dixon 2013-07-04 01:48:39 +02:00
parent 3a198ad8e8
commit defa2cd0da
2 changed files with 29 additions and 0 deletions

28
git_auto_pull.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
red='\033[31m'
green='\033[32m'
RED='\033[31m\033[01m'
blue='\033[34m'
BLUE='\033[34m'
cyan='\033[36m'
CYAN='\033[36m'
magenta='\033[35m'
DFT='\033[0m'
white='\033[37m'
for gitrepo in `find ./ -maxdepth 3 -type d -name ".git" | sed 's/\/.git\+$//'`;
do
cd $gitrepo
echo $gitrepo
git status
git pull 2>/dev/null
#RESULT=`git pull 2>/dev/null`
#if [ !`echo $RESULT | grep "up to date"` ]; then
# echo -e "$green up to date $DFT"
#else
# echo $RESULT
#fi;
cd - > /dev/null
echo "==========="
done

View file

@ -36,6 +36,7 @@ for i in `ls $WAI/vim/skeletons`; do ln -s $WAI/vim/skeletons/$i ./$i; done
cd ~
if [ -d "Programmation" ]; then mkdir Programmation; fi;
cd ~/Programmation
ln -s $WAI/git_auto_pull.sh ./git_auto_pull.sh
if [ ! -d "./Utils" ]; then mkdir Utils; fi;
cd ./Utils
ln -s $WAI/Utils/monitor.sh ./monitor.sh