upload script uses debian/control rather than debian/changelog
[git-tools-moved-to-github.git] / id-deb-build / id-upload.sh
1 #!/bin/sh
2 if test ! -f IDMETA; then
3         echo "IDMETA is not in current directory"
4         exit 1
5 fi
6 . ./IDMETA
7 if test -n "$NAME"; then
8         PRODUCT=$NAME
9 else
10         DEBCONTROL=debian/control
11         if test ! -f $DEBCONTROL; then
12                 echo "$DEBCONTROL missing"
13                 echo "The current directory should be base source of package"
14                 exit 1
15         fi
16         PRODUCT=`awk '/Source:/ {print $2}' $DEBCONTROL`
17 fi
18 TAR=${PRODUCT}-${VERSION}.tar.gz
19 echo "TAR=$TAR"
20 if test ! -f ${TAR}; then
21         echo "$0: ${TAR} missing"
22         exit 1
23 fi
24 set -e
25 if test -f Doxyfile; then
26         doxygen >out 2>stderr
27 fi
28 (cd doc && make ${PRODUCT}.pdf index.html)
29 cp NEWS doc/
30 scp ${TAR} ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/
31 tar cz --exclude=.git -f - dox doc|ssh website "cd /var/www/software/${PRODUCT}; tar x --overwrite -z -f -"
32 # Local Variables:
33 # mode:shell-script
34 # sh-indentation: 2
35 # sh-basic-offset: 8
36 # End: