Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 26 lines (20 sloc) 515 Bytes
#!/bin/sh
set -e
cd $(dirname $0)
if test -z "$VERSION"; then
VERSION=`cat .version`;
fi
if test -z "$EXTRAVERSION" -a -d .git; then
EXTRAVERSION=`git describe --dirty --tags --always --match="v$VERSION"`
if test "$EXTRAVERSION" = "v$VERSION"; then
EXTRAVERSION=
else
EXTRAVERSION=`echo "$EXTRAVERSION" | sed -e "s/^v$VERSION-//"`
fi
fi
cat <<EOF
-- This file is automatically generated.
module(..., package.seeall);
version = '$VERSION'
extra_version = '$EXTRAVERSION'
EOF