From d471d0bcd253ba50c2d77d0cdeec63ae7af5e58d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 4 Nov 2013 12:34:36 +0100 Subject: [PATCH] id-upload.sh uses IDMETA info --- id-deb-build/id-upload.sh | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/id-deb-build/id-upload.sh b/id-deb-build/id-upload.sh index 671ae84..b5959bc 100755 --- a/id-deb-build/id-upload.sh +++ b/id-deb-build/id-upload.sh @@ -1,19 +1,23 @@ #!/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 @@ -22,10 +26,10 @@ set -e 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 -- 1.7.10.4