]> git.armaanb.net Git - bin.git/blob - git-check
xsel: new script
[bin.git] / git-check
1 #!/usr/bin/env sh
2 # Go into each subdirectory and run a git stat
3
4 for i in ${1:-.}/*; do
5                 if [ -d $i/.git ]; then
6                                 stat=$(git -C $i diff --stat)
7                                 if [ -n "$stat" ]; then
8                                                 echo $i
9                                                 chars=${#i}
10                                                 j=0;
11                                                 while [ "$j" -le "$chars" ]; do
12                                                                 echo -n "="
13                                                                 j=$(( j + 1 ))
14                                                 done
15                                                 echo
16                                                 git -C $i diff --stat
17                                                 echo
18                                 fi
19                 fi
20 done