simplify/cleanup the scripts

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Luigi Rizzo 18 years ago
parent 9e4ebbee87
commit 19d616d4dc

@ -12,24 +12,19 @@ elif [ -d .svn ]; then
BASE=`LANG=C svn pg svnmerge-integrated ${1} | cut -d: -f1` BASE=`LANG=C svn pg svnmerge-integrated ${1} | cut -d: -f1`
if [ "${PARTS}" = "trunk" ] if [ "${PARTS}" = "trunk" ] ; then
then
echo SVN-trunk-r${REV} echo SVN-trunk-r${REV}
exit 0 exit 0
fi fi
for PART in $PARTS for PART in $PARTS ; do
do if [ ${TAG} != 0 ] ; then
if [ ${TAG} != 0 ]
then
RESULT="${PART}" RESULT="${PART}"
break break
fi fi
if [ ${BRANCH} != 0 ] if [ ${BRANCH} != 0 ] ; then
then if [ -z ${RESULT} ] ; then
if [ -z ${RESULT} ]
then
RESULT="${PART}" RESULT="${PART}"
else else
RESULT="${RESULT}-${PART}" RESULT="${RESULT}-${PART}"
@ -37,10 +32,8 @@ elif [ -d .svn ]; then
break break
fi fi
if [ ${TEAM} != 0 ] if [ ${TEAM} != 0 ] ; then
then if [ -z ${RESULT} ] ; then
if [ -z ${RESULT} ]
then
RESULT="${PART}" RESULT="${PART}"
else else
RESULT="${RESULT}-${PART}" RESULT="${RESULT}-${PART}"
@ -48,28 +41,24 @@ elif [ -d .svn ]; then
continue continue
fi fi
if [ "${PART}" = "branches" ] if [ "${PART}" = "branches" ] ; then
then
BRANCH=1 BRANCH=1
RESULT="branch" RESULT="branch"
continue continue
fi fi
if [ "${PART}" = "tags" ] if [ "${PART}" = "tags" ] ; then
then
TAG=1 TAG=1
continue continue
fi fi
if [ "${PART}" = "team" ] if [ "${PART}" = "team" ] ; then
then
TEAM=1 TEAM=1
continue continue
fi fi
done done
if [ ${TAG} != 0 ] if [ ${TAG} != 0 ] ; then
then
echo ${RESULT} echo ${RESULT}
else else
echo SVN-${RESULT}-r${REV}${BASE:+-${BASE}} echo SVN-${RESULT}-r${REV}${BASE:+-${BASE}}

@ -1,25 +1,17 @@
#!/bin/sh #!/bin/sh
if [ ! -f ../.flavor ]; then if [ ! -f ../.flavor ]; then
cat << END EXTRA=""
/*
* version.h
* Automatically generated
*/
#define ASTERISK_VERSION "${ASTERISKVERSION}"
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
END
else else
aadkver=`cat ../.version` aadkver=`cat ../.version`
aadkflavor=`cat ../.flavor` aadkflavor=`cat ../.flavor`
cat << END EXTRA=" (${aadkflavor} ${aadkver})"
fi
cat << END
/* /*
* version.h * version.h
* Automatically generated * Automatically generated
*/ */
#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor} ${aadkver})" #define ASTERISK_VERSION "${ASTERISKVERSION}${EXTRA}"
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM} #define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
END END
fi

Loading…
Cancel
Save