mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-26 07:58:52 +01:00
script to replace, eventually if I'm lucky, svnversion as a way to
mark a build's source.
This commit is contained in:
parent
d91f3de9a9
commit
21fef0ded8
1 changed files with 17 additions and 0 deletions
17
xwords4/scripts/gitversion.sh
Executable file
17
xwords4/scripts/gitversion.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
echo "usage: $0"
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ -z "$1" ] || usage
|
||||
|
||||
HASH=$(git log -1 --pretty=format:%H)
|
||||
|
||||
# mark it with a "+" if anything's changed
|
||||
if git status --porcelain | grep -q '^[^\?]'; then
|
||||
HASH="${HASH}+M"
|
||||
fi
|
||||
|
||||
echo $HASH
|
Loading…
Add table
Reference in a new issue