Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (15 sloc) 451 Bytes
#!/bin/sh
#
# Simple configuration script.
## Git version
GITHEAD=$(awk '/^version:/ {print $2}' Combinatorrent.cabal)
if test -d "${GIT_DIR:-.git}" ; then
GITHEAD=`git describe 2>/dev/null`
if test -z ${GITHEAD} ; then
GITHEAD=`git rev-parse HEAD`
fi
if test -n "`git diff-index -m --name-only HEAD`" ; then
GITHEAD="${GITHEAD}-dirty"
fi
fi
sed -e "s/@GITHEAD@/$GITHEAD/g" src/Version.hs.in > src/Version.hs