From: David Watson Date: Mon, 18 Apr 2011 08:41:04 +0000 (+0200) Subject: wrapper X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7854087457dc79cf24e7c9a5ee1e30439d7027c5;p=rss2email.git wrapper --- 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 $*