X-Git-Url: https://git.armaanb.net/?p=bin.git;a=blobdiff_plain;f=git-check;h=852624d34be101201f31ad0be9030579599066a7;hp=3392bcb1b8e2d0fae64a4869d0e8494e2d68e943;hb=864beaf66dfe57b6e2b83b86c868daee677ffda6;hpb=98a5aed1aa6e3479ccb3e0ec791d464c16b868d5 diff --git a/git-check b/git-check index 3392bcb..852624d 100755 --- a/git-check +++ b/git-check @@ -1,14 +1,16 @@ -#!/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