2013-03-03 11:19:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-10-23 10:56:28 +02:00
|
|
|
_printhelp()
|
|
|
|
{
|
|
|
|
cat<<EOF
|
|
|
|
Usage: ${0##*/} FOLDERS
|
|
|
|
|
|
|
|
Chack all git repos found in FOLDERS for non-commited file.
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ $# -eq 0 ] || [ "$1" = "-h" ]; then
|
|
|
|
_printhelp
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
for i; do
|
|
|
|
|
|
|
|
while IFS= read -r FOLDER; do
|
|
|
|
if [ -z "$(cd "${FOLDER%/*}" && git status -uno | grep "nothing to commit")" ]; then
|
|
|
|
echo "${FOLDER%/*}"
|
|
|
|
fi
|
|
|
|
done <<EOF
|
|
|
|
$(find "$i" -type d -name ".git")
|
2013-03-03 11:19:50 +01:00
|
|
|
EOF
|
2013-10-23 10:56:28 +02:00
|
|
|
done
|