(issue #14737) Reported by: davidw Patches: flavor.patch uploaded by davidw (license 780) Tested by: davidw git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
34 lines
551 B
Bash
Executable file
34 lines
551 B
Bash
Executable file
#!/bin/sh
|
|
if [ ! -f .flavor ]; then
|
|
EXTRA=""
|
|
else
|
|
aadkver=`cat .version`
|
|
aadkflavor=`cat .flavor`
|
|
EXTRA=" (${aadkflavor} ${aadkver})"
|
|
fi
|
|
cat << END
|
|
/*
|
|
* version.c
|
|
* Automatically generated
|
|
*/
|
|
|
|
#include "asterisk.h"
|
|
|
|
#include "asterisk/ast_version.h"
|
|
|
|
static const char asterisk_version[] = "${ASTERISKVERSION}${EXTRA}";
|
|
|
|
static const char asterisk_version_num[] = "${ASTERISKVERSIONNUM}";
|
|
|
|
const char *ast_get_version(void)
|
|
{
|
|
return asterisk_version;
|
|
}
|
|
|
|
const char *ast_get_version_num(void)
|
|
{
|
|
return asterisk_version_num;
|
|
}
|
|
|
|
END
|