Added status command to iop

This commit is contained in:
Jonas Höglund 2016-04-12 16:59:03 +02:00
parent 92fafa4245
commit 7e70ce6c5d

20
iop/scripts/status.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
function status {
topdir=$PWD
echo
for subdir in .git $(find feeds/ -type d -name .git); do
echo "======= $(dirname $subdir) ========"
cd $subdir/..
if git status |grep -Eq '^\s([^\s\(]+)'; then
git status |grep -Ev '(nothing added|use "git |^$)'
else
git status |grep -E "(On branch|HEAD detached)"
fi
cd $topdir
done
echo
}
register_command "status" "Display the state of your working tree"