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