r1916: *** empty log message ***
[uffi.git] / make-dist.sh
index 40bbf0c6b95a5b1700d71c3415112ae44cf4147f..d88be3c19332e513e1170732438ac6add66e82c2 100755 (executable)
@@ -14,12 +14,18 @@ DEBVERSION=`sed -n -e "s/${DEBPKG} (\(.*\)).*/\1/p" < debian/changelog  |head -1
 DISTDIR=${PKG}-${VERSION}
 DEBDIR=${DEBPKG}-${VERSION}
 
-# TAG=debian_version_`echo ${DEBVERSION} | tr . _`
-TAG=upstream_version_`echo ${VERSION} | tr . _`
-echo "(re)tagging with release tag '$TAG'"
-cvs -q rtag -d $TAG $PKG > /dev/null
-cvs -q tag -F $TAG > /dev/null
-
+DEB_TAG=debian_version_`echo ${DEBVERSION} | tr . _`
+UPSTREAM_TAG=upstream_version_`echo ${VERSION} | tr . _`
+echo "(Re-)tagging with Debian tag '${DEB_TAG}'"
+cvs -q rtag -d ${DEB_TAG} ${PKG} > /dev/null
+cvs -q tag -F ${DEB_TAG} > /dev/null
+
+# Retag with upstream tag if release not 0 or 1
+if [ "`echo ${DEBVERSION} | egrep '\-0$\-1$]'`" != "" ]; then
+  echo "(Re-)tagging with Upstream tag '${UPSTREAM_TAG}'"
+  cvs -q rtag -d $UPSTREAM_TAG $PKG > /dev/null
+  cvs -q tag -F $UPSTREAM_TAG > /dev/null
+fi
 
 # Prepare for archive
 cd ..
@@ -32,7 +38,7 @@ find ${DISTDIR} -type f -name .cvsignore -exec rm -f {} \;
 rm -rf `find ${DISTDIR} -type d -name CVS`
 rm -f `find ${DISTDIR} -type f -name '*~' -or -name '#*'  -or -name '#*#'`
 rm -f `find ${DISTDIR}/doc -type f -name \*.tex -or -name \*.aux -or \
-  -name \*.log -or -name \*.out -or -name \*.dvi -or -name bp`
+  -name \*.log -or -name \*.out -or -name \*.dvi -or -name copy`
 
 echo "Creating upstream archives"
 rm -rf ${DISTDIR}/debian