cfg/bin/git_status_recursive
Knut Ahlers efc8bc4f3c
Throw shfmt against bash scripts
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-03-10 12:47:55 +01:00

16 lines
402 B
Bash
Executable file

#!/bin/bash
[ -e ~/.bashcolors ] && . ~/.bashcolors
startpath=$(pwd)
for repo in $(find . -name ".git"); do
repodir=$(dirname $repo)
reponame=$(basename $repodir)
cd $repodir
LANG=C git status | grep -q "nothing to commit"
state=$?
cd $startpath
echo -n "$reponame: "
[ $state -eq 0 ] && echo -e "${PR_GREEN}Up-2-date${PR_NC}" || echo -e "${PR_BR_RED}Changes available${PR_NC}"
done