]>
git.zerfleddert.de Git - proxmark3-svn/blob - tools/mkversion.pl
de394a85d67214dd00e015eaaf30a0cb7b99f45c
2 # Output a version.c file that includes information about the current build
3 # Normally a couple of lines of bash would be enough (see openpcd project, original firmware by Harald Welte and Milosch Meriac)
4 # but this will, at least in theory, also work on Windows with our current compile environment.
5 # -- Henryk Plötz <henryk@ploetzli.ch> 2009-09-28
6 # Modified april 2014 because of the move to github.
7 # --- Martin Holst Swende <martin@swende.se>
10 # Clear environment locale so that svn will not use localized strings
14 my $gitversion = `git describe --dirty`;
15 my $gitbranch = `git rev-parse --abbrev-ref HEAD`;
17 my @compiletime = gmtime();
19 my $fullgitinfo= $gitbranch . '/'.$gitversion;
21 $fullgitinfo=~ s/(\s)//g;
23 # Crop so it fits within 50 characters
24 $fullgitinfo =~ s/.{50}\K.*//s;
27 $compiletime[5] += 1900;
28 my $ctime = sprintf("%6\$04i-%5\$02i-%4\$02i %3\$02i:%2\$02i:%1\$02i", @compiletime);
32 #include "proxmark3.h"
33 /* Generated file, do not edit */
34 const struct version_information __attribute__((section(".version_information"))) version_information = {
35 VERSION_INFORMATION_MAGIC,