Add script to build and upload tar + documentation
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 21 Apr 2010 12:51:08 +0000 (14:51 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 21 Apr 2010 12:51:08 +0000 (14:51 +0200)
id-deb-build/id-upload.sh [new file with mode: 0755]

diff --git a/id-deb-build/id-upload.sh b/id-deb-build/id-upload.sh
new file mode 100755 (executable)
index 0000000..3a72de7
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+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`
+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
+if test ! -f ${TAR}; then
+       echo "$0: ${TAR} missing"
+       exit 1
+fi
+set -e
+if test -f Doxyfile; then
+       doxygen >out 2>stderr
+fi
+(cd doc && make ${PRODUCT}.pdf index.html)
+cp NEWS doc/
+cp ${TAR} ftp.indexdata.dk:/home/ftp/pub/${PROD}/
+tar cz --exclude=.git -f - dox doc|ssh website "cd software/${PROD}; tar xzf -"
+# Local Variables:
+# mode:shell-script
+# sh-indentation: 2
+# sh-basic-offset: 8
+# End: