cfg/bin/git_status_recursive

17 lines
414 B
Text
Raw Normal View History

2016-07-21 13:48:49 +00:00
#!/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