You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
XAirMixerControl/gitinfo.awk

17 lines
633 B
Awk

#!/usr/bin/gawk -f
BEGIN {
printf("#ifndef __GITDEFS_H__\n")
printf("#define __GITDEFS_H__\n\n")
printf("/* Do not edit this file */\n")
printf("/* Automatic generated by gitinfo.awk */\n\n\n")
}
NR == 1 { printf("#define GIT_HASH_STR \"%s\"\n", $0); }
NR == 2 { printf("#define GIT_HASH_HEX 0x%s\n", $0); }
NR == 3 { printf("#define GIT_BRANCH_STR \"%s\"\n", $0); }
NR == 4 { printf("#define GIT_VERSION_STR \"%s\"\n", $0); }
NR == 5 { printf("#define GIT_BUILD_NR %u\n", $0);
printf("#define GIT_BUILD_STR \"%s\"\n", $0); }
END { printf("\n\n#endif\n\n"); }