From 7854087457dc79cf24e7c9a5ee1e30439d7027c5 Mon Sep 17 00:00:00 2001 From: David Watson Date: Mon, 18 Apr 2011 10:41:04 +0200 Subject: [PATCH] wrapper --- r2e | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/r2e b/r2e index e582fae..ed735cf 100755 --- a/r2e +++ b/r2e @@ -1,2 +1,16 @@ #!/bin/sh -python rss2email.py feeds.dat $* +set -e +dir=~/.rss2email +if [ "$1" = "-d" ]; then + if [ -z "$2" ]; then + echo "r2e: -d missing directory" >&2 + exit 1 + fi + dir="$2" + shift 2 +fi +if [ ! -d "$dir" ]; then + mkdir -p "$dir" +fi +cd "$dir" +exec python /usr/share/rss2email/rss2email.py feeds.dat $* -- 2.26.2