cfg/bin/git_status_recursive
2016-07-21 16:29:54 +02:00

16 lines
414 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