Files
asterisk/build_tools/make_version_h
Tilghman Lesher 44ffc646b3 Deal with the situation where .flavor exists but .version does not.
Also make the script slightly more portable, in keeping with autoconf syntax.
(closes issue #14737)
 Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@234699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-14 21:09:56 +00:00

37 lines
701 B
Bash
Executable File

#!/bin/sh
if test ! -f .flavor ; then
cat << END
/*
* version.h
* Automatically generated
*/
#define ASTERISK_VERSION "${ASTERISKVERSION}"
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
END
elif test ! -f .version ; then
aadkflavor=`cat .flavor`
cat << END
/*
* version.h
* Automatically generated
*/
#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor})"
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
END
else
aadkver=`cat .version`
aadkflavor=`cat .flavor`
cat << END
/*
* version.h
* Automatically generated
*/
#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor} ${aadkver})"
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
END
fi