2009-05-11 04:19:57 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Check for git and a git repo.
|
|
|
|
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
|
2009-05-13 21:15:46 +02:00
|
|
|
comm=`git log --pretty=oneline -n1 | awk ' { print $1 }'`
|
2009-05-15 14:54:55 +02:00
|
|
|
printf "%s" ""`printf "%s" \`git describe --abbrev=4 --match mini-\* $comm | awk '{ sub (/mini-/, ""); print;}'\``
|
2009-05-11 04:19:57 +02:00
|
|
|
|
|
|
|
# Are there uncommitted changes?
|
|
|
|
git update-index --refresh --unmerged > /dev/null
|
2009-05-15 14:54:55 +02:00
|
|
|
git diff-index --quiet HEAD || printf "%s" '*'
|
2009-05-11 04:19:57 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo
|