mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-17 15:36:50 +00:00
Merge pull request #47 from joonicks/dev
githash incl branch, sample conf guid note
This commit is contained in:
commit
01033d4283
@ -71,7 +71,9 @@ link 4 ongabonga_pass
|
|||||||
;
|
;
|
||||||
; create a new bot
|
; create a new bot
|
||||||
;
|
;
|
||||||
; 1 the globally uniqe ID (guid), used for botnet linking
|
; 1 the globally uniqe ID (guid), used for botnet linking (0-65536)
|
||||||
|
; Note: dont use a common number unless you are dead certain that
|
||||||
|
; your bot will never link to any other. Changing guid can be a mess.
|
||||||
; emech3 the bots nick
|
; emech3 the bots nick
|
||||||
;
|
;
|
||||||
nick 1 emech3
|
nick 1 emech3
|
||||||
|
|||||||
@ -513,7 +513,7 @@ void datestamp(void)
|
|||||||
void githash(void)
|
void githash(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GIT
|
#ifdef HAVE_GIT
|
||||||
system("git log -n 1 | grep commit | sed -r 's/^commit (.{7}).*/#define GITHASH \" (git:\\1)\"/g;' > githash.h");
|
system("./lib/git.sh > githash.h");
|
||||||
#else
|
#else
|
||||||
system("echo '#define GITHASH \"\"' > githash.h");
|
system("echo '#define GITHASH \"\"' > githash.h");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
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')"'
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user