flokati/genbuilddate.sh

14 lines
353 B
Bash
Executable File

#!/bin/sh
BUILDDATEDIR="version"
BUILDDATEGO="version/builddate.go"
if [ ! -d "$BUILDDATEDIR" ]; then
mkdir $BUILDDATEDIR
fi
echo "package version" >$BUILDDATEGO
echo "" >>$BUILDDATEGO
echo "const (" >>$BUILDDATEGO
echo -n " FlokatiBuilddate = \"" >>$BUILDDATEGO
echo -n `date` >>$BUILDDATEGO
echo "\"" >>$BUILDDATEGO
echo ")" >>$BUILDDATEGO