savezelda/describe.sh
Segher Boessenkool 15edfaae0f Initial commit
Enjoy!
2009-05-26 10:12:55 +02:00

13 lines
267 B
Bash
Executable File

#!/bin/bash
# Check for git and a git repo.
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
echo -n `git describe`
# Are there uncommitted changes?
git update-index --refresh --unmerged > /dev/null
git diff-index --quiet HEAD || echo -n -dirty
fi
echo