#!/bin/sh
-DEBCHANGELOG=debian/changelog
-if test ! -f $DEBCHANGELOG; then
- echo "$DEBCHANGELOG missing"
- echo "The current directory should be base source of package"
+if test ! -f IDMETA; then
+ echo "IDMETA is not in current directory"
exit 1
fi
-l=`head -1 $DEBCHANGELOG`
-PROD=`echo $l|sed 's/ .*//g'`
-VERSION=`echo $l|sed 's/.*(//g'|sed 's/).*//g'`
-echo "VERSION=$VERSION"
-MAJOR=`echo $VERSION|sed 's/-.*//g'`
-echo "MAJOR=$MAJOR"
-MINOR=`echo $VERSION|sed 's/.*-//g'`
-echo "MINOR=$MINOR"
-TAR=${PROD}-${MAJOR}.tar.gz
+. ./IDMETA
+if test -n "$NAME"; then
+ PRODUCT=$NAME
+else
+ DEBCHANGELOG=debian/changelog
+ if test ! -f $DEBCHANGELOG; then
+ echo "$DEBCHANGELOG missing"
+ echo "The current directory should be base source of package"
+ exit 1
+ fi
+ l=`head -1 $DEBCHANGELOG`
+ PRODUCT=`echo $l|sed 's/ .*//g'`
+fi
+TAR=${PRODUCT}-${VERSION}.tar.gz
+echo "TAR=$TAR"
if test ! -f ${TAR}; then
echo "$0: ${TAR} missing"
exit 1
if test -f Doxyfile; then
doxygen >out 2>stderr
fi
-(cd doc && make ${PROD}.pdf index.html)
+(cd doc && make ${PRODUCT}.pdf index.html)
cp NEWS doc/
-scp ${TAR} ftp.indexdata.dk:/home/ftp/pub/${PROD}/
-tar cz --exclude=.git -f - dox doc|ssh website "cd /var/www/software/${PROD}; tar x --overwrite -z -f -"
+scp ${TAR} ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/
+tar cz --exclude=.git -f - dox doc|ssh website "cd /var/www/software/${PRODUCT}; tar x --overwrite -z -f -"
# Local Variables:
# mode:shell-script
# sh-indentation: 2