Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6eba86f3c6
Fetching contributors…

Cannot retrieve contributors at this time

executable file 19 lines (15 sloc) 0.451 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/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
Something went wrong with that request. Please try again.