diff options
author | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-06-26 14:18:42 +0000 |
---|---|---|
committer | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-06-26 14:18:42 +0000 |
commit | b7d0f977e0f6bef02103a33aa9e5639d9ea3bfee (patch) | |
tree | 39ce673aeb318cc8b0234bb950a7f4f60b7df55c /build_tools/make_version | |
parent | 65a9b51ba369276966ae2422d6df70b8e21aa106 (diff) |
merge autoconf and menuselect support for zaptel
Happy birthday to me :)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1179 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'build_tools/make_version')
-rwxr-xr-x | build_tools/make_version | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/build_tools/make_version b/build_tools/make_version new file mode 100755 index 0000000..d710ffa --- /dev/null +++ b/build_tools/make_version @@ -0,0 +1,56 @@ +#!/bin/sh + +if [ -f ${1}/.version ]; then + cat ${1}.version +elif [ -f ${1}/.svnrevision ]; then + echo SVN-`cat ${1}/.svnbranch`-r`cat ${1}/.svnrevision` +elif [ -d .svn ]; then + PARTS=`LANG=C svn info ${1} | grep URL | awk '{print $2;}' | sed -e s:^.*/svn/zaptel/:: | sed -e 's:/: :g'` + BRANCH=0 + TEAM=0 + + REV=`svnversion -c ${1} | cut -d: -f2` + + if [ "${PARTS}" = "trunk" ] + then + echo SVN-'trunk'-r${REV} + exit 0 + fi + + for PART in $PARTS + do + if [ ${BRANCH} != 0 ] + then + RESULT="${RESULT}-${PART}" + break + fi + + if [ ${TEAM} != 0 ] + then + RESULT="${RESULT}-${PART}" + continue + fi + + if [ "${PART}" = "branches" ] + then + BRANCH=1 + RESULT="branch" + continue + fi + + if [ "${PART}" = "tags" ] + then + BRANCH=1 + RESULT="tag" + continue + fi + + if [ "${PART}" = "team" ] + then + TEAM=1 + continue + fi + done + + echo SVN-${RESULT##-}-r${REV} +fi |