From 6b240c98c2ca285674e246a445e0c4b8dfb6d7ae Mon Sep 17 00:00:00 2001 From: Benedikt Böhm Date: Sun, 25 Jan 2009 12:27:07 +0100 Subject: update mkrelease and README --- README | 80 ------------------------------------------------------------ README.rst | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ mkrelease.sh | 23 +++++++++++------ 3 files changed, 95 insertions(+), 88 deletions(-) delete mode 100644 README create mode 100644 README.rst diff --git a/README b/README deleted file mode 100644 index c4c2a6d..0000000 --- a/README +++ /dev/null @@ -1,80 +0,0 @@ -========= -porticron -========= - -:Author: `Benedikt Böhm `_ -:Version: 0.3 -:Web: http://bb.xnull.de/projects/porticron/ -:Source: http://git.xnull.de/gitweb/?p=porticron.git -:Download: http://bb.xnull.de/projects/porticron/dist/ - -porticron is a simple shell script for portage similar to apticron for debian. -It is called from cron to sync your portage tree and send any pending upgrade -via email. - -Installation -============ - -porticron is available via portage: -:: - - emerge porticron - -Configuration -============= - -The configuration for porticron is located at ``/etc/porticron.conf``. You can -set the following options: - -SYNC_CMD - The command porticron should use to synchronize your portage tree. Defaults - to ``/usr/bin/emerge --sync``. Set this to ``/bin/true`` if your portage tree - is mounted read-only (e.g. via nfs). - -SYNC_OVERLAYS_CMD - The command porticron should use to synchronize your overlays. Defaults to - ``/bin/true``. Set this to ``/usr/bin/layman --sync-all`` to use layman for - overlay synchronization. - -UPGRADE_OPTS - Command-line options that should be passed to emerge while scanning for - pending upgrades. Defaults to ``--deep --update``. - -RCPT - Recipient of notification mails. Defaults to ``root@$(hostname -f)`` - -SENDMAIL - Path to sendmail binary. Defaults to ``/usr/sbin/sendmail`` - -Example -======= - -A sample of an upgrade notification looks like this: -:: - - porticron report [Tue, 09 Dec 2008 05:07:06 +0100] - ======================================================================== - - porticron has detected that some packages need upgrading: - - [ebuild U ] sys-libs/timezone-data-2008i [2008g-r1] - [ebuild U ] sys-apps/man-pages-3.14 [3.12] - [ebuild U ] sys-process/htop-0.8.1-r1 [0.8.1] - [ebuild U ] sys-apps/util-linux-2.14.1 [2.13.1.1] - [ebuild U ] app-portage/elogv-0.7.2 [0.7.1] - [ebuild U ] sys-apps/busybox-1.11.3 [1.11.1] - [ebuild U ] app-admin/eselect-1.0.11-r1 [1.0.10] - - ======================================================================== - - You can perform the upgrade by issuing the command: - - emerge --deep --update world - - as root on foo.example.com - - It is recommended that you pretend the upgrade first to confirm that - the actions that would be taken are reasonable. The upgrade may be - pretended by issuing the command: - - emerge --deep --update --pretend world diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..69e4fb4 --- /dev/null +++ b/README.rst @@ -0,0 +1,80 @@ +========= +porticron +========= + +:Author: `Benedikt Böhm `_ +:Version: 0.3 +:Web: http://bb.xnull.de/projects/porticron/ +:Source: http://git.xnull.de/gitweb/?p=porticron.git (also on `github `_) +:Download: http://bb.xnull.de/projects/porticron/dist/ + +porticron is a simple shell script for portage similar to apticron for debian. +It is called from cron to sync your portage tree and send any pending upgrade +via email. + +Installation +============ + +porticron is available via portage: +:: + + emerge porticron + +Configuration +============= + +The configuration for porticron is located at ``/etc/porticron.conf``. You can +set the following options: + +SYNC_CMD + The command porticron should use to synchronize your portage tree. Defaults + to ``/usr/bin/emerge --sync``. Set this to ``/bin/true`` if your portage tree + is mounted read-only (e.g. via nfs). + +SYNC_OVERLAYS_CMD + The command porticron should use to synchronize your overlays. Defaults to + ``/bin/true``. Set this to ``/usr/bin/layman --sync-all`` to use layman for + overlay synchronization. + +UPGRADE_OPTS + Command-line options that should be passed to emerge while scanning for + pending upgrades. Defaults to ``--deep --update``. + +RCPT + Recipient of notification mails. Defaults to ``root@$(hostname -f)`` + +SENDMAIL + Path to sendmail binary. Defaults to ``/usr/sbin/sendmail`` + +Example +======= + +A sample of an upgrade notification looks like this: +:: + + porticron report [Tue, 09 Dec 2008 05:07:06 +0100] + ======================================================================== + + porticron has detected that some packages need upgrading: + + [ebuild U ] sys-libs/timezone-data-2008i [2008g-r1] + [ebuild U ] sys-apps/man-pages-3.14 [3.12] + [ebuild U ] sys-process/htop-0.8.1-r1 [0.8.1] + [ebuild U ] sys-apps/util-linux-2.14.1 [2.13.1.1] + [ebuild U ] app-portage/elogv-0.7.2 [0.7.1] + [ebuild U ] sys-apps/busybox-1.11.3 [1.11.1] + [ebuild U ] app-admin/eselect-1.0.11-r1 [1.0.10] + + ======================================================================== + + You can perform the upgrade by issuing the command: + + emerge --deep --update world + + as root on foo.example.com + + It is recommended that you pretend the upgrade first to confirm that + the actions that would be taken are reasonable. The upgrade may be + pretended by issuing the command: + + emerge --deep --update --pretend world 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 -- cgit v1.2.3-65-gdbad