dotfiles/git_auto_pull.sh
Frank Villaro-Dixon defa2cd0da git auto pull
2013-07-04 01:48:39 +02:00

28 lines
520 B
Bash
Executable file

#!/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