blob: a793e8d187644b2b1a88ca5dfaba20948ccfd3de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
source /etc/init.d/functions.sh
PROJECT=$(sed -n '2{p;q;}' README.rst|tr '[A-Z]' '[a-z]')
VERSION=$(sed 's/^:Version: \(.*\)/\1/;t;d' README.rst)
HTDOCS=~/public_html/projects/${PROJECT}
DISTTAR=${HTDOCS}/dist/${PROJECT}-${VERSION}.tar.bz2
mkdir -p ${HTDOCS}/dist
ebegin "Generating project page"
~/work/rst2html.py ~/public_html/template.html < README.rst > ${HTDOCS}/index.html
eend $?
if [[ -e ${DISTTAR} ]]; then
echo "!!! ${DISTTAR} exists."
else
ebegin "Creating release tarball"
git archive --format=tar --prefix=${PROJECT}-${VERSION}/ HEAD | \
bzip2 > ${DISTTAR}
eend $?
fi
|