Skip to content

Commit d1da639

Browse files
committed
Added buildcodes generator
1 parent 834fad4 commit d1da639

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

generate-buildcodes.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
build_code=`date +%s`
4+
build_date=`date`
5+
build_box=`uname -a`
6+
#build_cmd=`history !-1`
7+
BCF='buildcodes.h'
8+
9+
printf "\n// Autogenerated buildcode file - this will change on every make\n" > $BCF
10+
printf "#define BUILD_CODE \"$build_code\"\n" >> $BCF
11+
printf "#define BUILD_DATE \"$build_date\"\n" >> $BCF
12+
printf "#define BUILD_BOX \"$build_box\"\n" >> $BCF
13+
#printf "#define BUILD_CMD \"$build_cmd\"\n" >> $BCF
14+
15+
printf "\n" >> $BCF
16+
17+
exit 0

0 commit comments

Comments
 (0)