mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-29 16:14:43 +00:00
githash incl branch, sample conf guid note
This commit is contained in:
6
src/lib/git.sh
Executable file
6
src/lib/git.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
hash=`git log -n 1 | sed -r 's/^commit (.{7}).*$/\1/g; 1!d'`
|
||||
branch=`git status | sed -r 's/^On branch (.+)/\1/g; 1!d'`
|
||||
echo '#define GITHASH " (git:'$branch'-'$hash')"'
|
||||
|
||||
Reference in New Issue
Block a user