make_version_h 701 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. if test ! -f .flavor ; then
  3. cat << END
  4. /*
  5. * version.h
  6. * Automatically generated
  7. */
  8. #define ASTERISK_VERSION "${ASTERISKVERSION}"
  9. #define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
  10. END
  11. elif test ! -f .version ; then
  12. aadkflavor=`cat .flavor`
  13. cat << END
  14. /*
  15. * version.h
  16. * Automatically generated
  17. */
  18. #define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor})"
  19. #define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
  20. END
  21. else
  22. aadkver=`cat .version`
  23. aadkflavor=`cat .flavor`
  24. cat << END
  25. /*
  26. * version.h
  27. * Automatically generated
  28. */
  29. #define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor} ${aadkver})"
  30. #define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
  31. END
  32. fi