mirror of
https://github.com/berthubert/galmon.git
synced 2026-05-14 21:26:54 -04:00
17 lines
284 B
Bash
Executable file
17 lines
284 B
Bash
Executable file
#!/bin/sh
|
|
HASH=$(git describe --always --dirty=+ | tr -d '\n')
|
|
|
|
echo \#define GIT_HASH \"$HASH\" > githash.h.tmp
|
|
echo $HASH > githash
|
|
|
|
cmp -s githash.h githash.h.tmp > /dev/null
|
|
|
|
if [ "$?" -ne "0" ]
|
|
then
|
|
mv githash.h.tmp githash.h
|
|
echo updated githash.h
|
|
else
|
|
rm githash.h.tmp
|
|
fi
|
|
|
|
|