X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=id-deb-build%2Fid-upload.sh;h=c4618a93622f4820d166a5236b72ff13827c1937;hb=771dd4c6a3605db0d2aa01f8295ba6084332d85a;hp=57649b9152525c676fc55c1bec02db67970d2be9;hpb=fb127c52d33f2352fcc6a56d84e83a1c937acbb3;p=git-tools-moved-to-github.git diff --git a/id-deb-build/id-upload.sh b/id-deb-build/id-upload.sh index 57649b9..c4618a9 100755 --- a/id-deb-build/id-upload.sh +++ b/id-deb-build/id-upload.sh @@ -1,19 +1,22 @@ #!/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 + DEBCONTROL=debian/control + if test ! -f $DEBCONTROL; then + echo "$DEBCONTROL missing" + echo "The current directory should be base source of package" + exit 1 + fi + PRODUCT=`awk '/Source:/ {print $2}' $DEBCONTROL` +fi +TAR=${PRODUCT}-${VERSION}.tar.gz +echo "TAR=$TAR" if test ! -f ${TAR}; then echo "$0: ${TAR} missing" exit 1 @@ -22,10 +25,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 software/${PROD}; tar xzf -" +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