diff options
-rw-r--r-- | README.rst (renamed from README) | 2 | ||||
-rwxr-xr-x | mkrelease.sh | 23 |
2 files changed, 16 insertions, 9 deletions
@@ -5,7 +5,7 @@ porticron :Author: `Benedikt Böhm <bb@xnull.de>`_ :Version: 0.3 :Web: http://bb.xnull.de/projects/porticron/ -:Source: http://git.xnull.de/gitweb/?p=porticron.git +:Source: http://git.xnull.de/gitweb/?p=porticron.git (also on `github <http://github.com/hollow/porticron>`_) :Download: http://bb.xnull.de/projects/porticron/dist/ porticron is a simple shell script for portage similar to apticron for debian. diff --git a/mkrelease.sh b/mkrelease.sh index 6a36706..c5dec25 100755 --- a/mkrelease.sh +++ b/mkrelease.sh @@ -2,16 +2,23 @@ source /etc/init.d/functions.sh -PROJECT=porticron -VERSION=$(sed 's/^:Version: \(.*\)/\1/;t;d' README) +PROJECT=$(sed -n '2{p;q;}' README.rst) +VERSION=$(sed 's/^:Version: \(.*\)/\1/;t;d' README.rst) -mkdir -p ~/public_html/projects/${PROJECT}/dist +HTDOCS=~/public_html/projects/${PROJECT} +DISTTAR=${HTDOCS}/dist/${PROJECT}-${VERSION}.tar.bz2 -ebegin "Creating release tarball" -git archive --format=tar --prefix=${PROJECT}-${VERSION}/ HEAD | \ -bzip2 > ~/public_html/projects/${PROJECT}/dist/${PROJECT}-${VERSION}.tar.bz2 -eend $? +mkdir -p ${HTDOCS}/dist ebegin "Generating project page" -rst2html.py < README > ~/public_html/projects/${PROJECT}/index.html +rst2html.py < 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 |