#!/bin/sh

VERSION=`sed -n -e '1s/^ara (\([^ ]*\)) .*$/\1/p' ../debian/changelog`
DATE=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +'%04Y-%02m-%02d')

rm -f version.ml
sed -e 's/\$VERSION\$/'"$VERSION"'/g' \
    -e 's/\$DATE\$/'"$DATE"'/g' \
    version.ml.tpl >version.ml
