18 lines
460 B
Bash
Executable File
18 lines
460 B
Bash
Executable File
#!/bin/bash
|
|
cat <<!
|
|
#include "LA_version.h"
|
|
const char LA::version[] =
|
|
!
|
|
echo -n '"'
|
|
echo -n `git describe`
|
|
echo -n ' HEAD commit = '
|
|
head=`git rev-parse HEAD`
|
|
echo -n $head
|
|
echo -n ' dated '
|
|
echo -n `git show -s --format=%ci $head`
|
|
echo -n ' compiled on ' `date` 'at' `hostname` 'by' `whoami`
|
|
#the argument is the DEBUGOPT of the build (Makefile)
|
|
case "$1" in *DEBUG*) echo -n ' (debug build)';; *) echo -n ' (production build)';; esac
|
|
echo -n '"'
|
|
echo ';'
|