[New] added script to log commits ahead of origin

This commit is contained in:
Robert von Burg 2013-11-16 01:52:03 +01:00
parent d79532c201
commit f1f6719caf
1 changed files with 30 additions and 0 deletions

30
aheadStatus.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
#######################################################################
##
## Shows how far ahead each project is against origin
##
#######################################################################
function logAheadCount() {
aheadCount="$(git rev-list origin..master --count)"
if [ "${aheadCount}" -ne 0 ] ; then
project="${PWD}"
project="${project##*/}"
echo "${project} is ahead of origin by ${aheadCount} commits"
fi
}
echo "Checking how far ahead each project is against origin..."
cd ..
cd "li.strolch.parent" ; logAheadCount ; cd ..
cd "li.strolch.bom" ; logAheadCount ; cd ..
cd "li.strolch.model" ; logAheadCount ; cd ..
cd "li.strolch.testbase" ; logAheadCount ; cd ..
cd "li.strolch.runtime" ; logAheadCount ; cd ..
cd "li.strolch.service" ; logAheadCount ; cd ..
cd "li.strolch.persistence.api" ; logAheadCount ; cd ..
cd "li.strolch.persistence.xml" ; logAheadCount ; cd ..
cd "li.strolch.tutorialapp" ; logAheadCount ; cd ..
echo "Done."
exit 0