-#!/usr/bin/env bash
+#!/usr/bin/env sh
# Go into each subdirectory and run a git stat
for i in ${1:-.}/*; do
- if [[ -d $i/.git ]]; then
+ if [ -d $i/.git ]; then
stat=$(git -C $i diff --stat)
- if [[ -n $stat ]]; then
+ if [ -n "$stat" ]; then
echo $i
chars=${#i}
- for (( j = 0; j < $chars; j++ )); do
+ j=0;
+ while [ "$j" -le "$chars" ]; do
echo -n "="
+ j=$(( j + 1 ))
done
echo
git -C $i diff --stat