r2211: *** empty log message ***
[ctsim.git] / make-upstream.sh
diff --git a/make-upstream.sh b/make-upstream.sh
deleted file mode 100755 (executable)
index d39aa59..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/bin/bash 
-#
-# Creates upstream packages
-# Programmer: Kevin Rosenberg
-
-set -e # abort on error
-
-usage () {
-    progname="`basename \"$0\"`"
-
-    cat >&2 <<EOF
-Usage: $progname [options]
-Creates upstream archives
-Options:
-  -t   Tag CVS tree with current version numbers
-  -c   Commit all files to CVS server
-  -h   Print this brief help
-EOF
-}
-
-# Command line
-while [ $# != 0 ]; do
-    value="`echo x\"$1\" | sed -e 's/^x-.//'`"
-    case "$1" in
-        -h)  usage; exit 0           ;;
-        -t)  opt_tag=1               ;;
-        -c)  opt_commit=1            ;;
-         *)  usage; exit 0           ;;
-    esac
-    shift
-done
-
-DEBPKG=ctsim
-PKG=ctsim
-TOPDIR=`pwd`
-
-VERSION=`sed -n -e "s/${DEBPKG} (\(.*\)-[0-9.]).*/\1/p" < debian/changelog  |head -1`
-
-PACKAGE_DIR=/usr/local/src/Packages/${DEBPKG}
-DISTDIR=${PKG}-${VERSION}
-DEBDIR=${DEBPKG}-${VERSION}
-
-if [ ! -z ${opt_commit} ]; then
-    echo "Committing to CVS server"
-    cvs commit -m "Committing for ${VERSION}"
-fi
-
-if [ ! -z ${opt_tag} ]; then
-    UPSTREAM_TAG=upstream_version_`echo ${VERSION} | tr . _`
-    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
-
-if [ -f ${PACKAGE_DIR}/${DEBPKG}_${VERSION}.orig.tar.gz ]; then
-  echo "File ${PACKAGE_DIR}/${DEBPKG}_${VERSION}.orig.tar.gz already exists."
-  echo -n "Are you sure that you want to create a new upstream archive? (y/N): "
-  read answer
-  case $answer in
-      [Yy]*) nop= ;;
-      *) echo "Not building"
-        exit 1
-         ;;
-  esac
-fi
-
-
-if [ ! -f docs/${PKG}.htb -o ! -f docs/html/${PKG}_contents.html -o ! -f docs/${PKG}.pdf ]; then
-  echo "Making documentation"
-  ../make-doc.sh
-fi
-
-# Prepare for archive
-cd ..
-rm -f ${PKG}_${VERSION}.tar.gz ${DEBPKG}_${VERSION}.orig.tar.gz
-rm -rf ${DISTDIR} ${DEBDIR} ${DISTDIR}.zip
-cp -a ${TOPDIR} ${DISTDIR}
-
-echo "Cleaning distribution directory ${DISTDIR}"
-cd ${DISTDIR}
-make distclean
-rm -f upload.sh make-debian.sh make-upstream.sh cvsbp-prepare.sh make-doc.sh 
-rm -f `find . -type f -name .cvsignore`
-rm -rf `find . -type d -name CVS -or -name .deps`
-rm -f `find . -type f -name '*~' -or -name '.#*'  -or -name '#*#' -or -name ".*~" -or -name "*.o" -or -name "*.a"`
-rm -f `find doc -type f -name \*.tex -or -name \*.aux -or \
-  -name \*.log -or -name \*.out -or -name \*.dvi`
-rm -rf images doc stamp-h.in build-stamp stamp-h configure-stamp autom4te.cache do-autoconf config.log config.status config.h
-cd ..
-
-echo "Creating upstream archives"
-rm -rf ${DISTDIR}/debian
-GZIP=-9 tar czf ${DISTDIR}.tar.gz ${DISTDIR}
-
-if [ "${DISTDIR}" != "${DEBDIR}" ]; then 
-  cp -a ${DISTDIR} ${DEBDIR}
-else
-  cp -a ${DISTDIR} ${DEBDIR}-copy
-fi
-
-unix2dos `find ${DISTDIR} -type f -and -name '*.c' -or -name '*.h' -or \
-  -name '*.cpp' -or -name '*.sh' -or -name '*.in' -or \
-  -name 'Makefile*' -or -name ChangeLog -or -name COPYRIGHT -or -name TODO -or \
-  -name README -or -name INSTALL -or -name NEWS -or -name '*.tex' -or \
-  -name '*.hhc' -or -name '*.hhk' -or -name '*.hpj' -or -name '*.ini' -or \
-  -name COPYING* -or -name catalog` 
-zip -rq ${DISTDIR}.zip ${DISTDIR}
-rm -r ${DISTDIR}
-
-if [ "${DISTDIR}" == "${DEBDIR}" ]; then 
-  mv ${DEBDIR}-copy ${DEBDIR}
-fi
-GZIP=-9 tar czf ${DEBPKG}_${VERSION}.orig.tar.gz ${DEBDIR}
-
-cp -a ${TOPDIR}/debian ${DEBDIR}
-rm -f ${DEBDIR}/debian/.cvsignore 
-rm -rf ${DEBDIR}/debian/CVS
-
-rm -rf ${DEBDIR}
-
-echo "Moving upstream archives to ${PACKAGE_DIR}"
-mkdir -p /usr/local/src/Packages/${DEBPKG}
-rm -f ${PACKAGE_DIR}/${DISTDIR}.zip ${PACKAGE_DIR}/${DEBPKG}_${VERSION}.orig.tar.gz
-mv ${DISTDIR}.zip ${DEBPKG}_${VERSION}.orig.tar.gz ${DISTDIR}.tar.gz ${PACKAGE_DIR}
-
-cd ${TOPDIR}
-exit 0