From 864beaf66dfe57b6e2b83b86c868daee677ffda6 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Mon, 31 May 2021 23:18:59 -0400 Subject: [PATCH] git-check: convert from bash to sh --- git-check | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.39.2