run.sh - sfeed_tests - sfeed tests and RSS and Atom files
HTML git clone git://git.codemadness.org/sfeed_tests
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
run.sh (719B)
---
1 #!/bin/sh
2
3 bin="sfeed_mbox"
4
5 maildir="$(pwd)/maildir"
6 feedsdir="$HOME/.sfeed/feeds"
7 procmailconfig="$(pwd)/procmailrc"
8
9 # message-id cache to prevent duplicates.
10 mkdir -p "${maildir}/.cache"
11
12 if ! test -r "${procmailconfig}"; then
13 printf "Procmail configuration file \"%s\" does not exist or is not readable.\n" "${procmailconfig}" >&2
14 echo "See procmailrc.example for an example." >&2
15 exit 1
16 fi
17
18 find "${feedsdir}" -type f -exec printf '%s\n' {} \; | while read -r d; do
19 name=$(basename "${d}")
20 mkdir -p "${maildir}/${name}/cur"
21 mkdir -p "${maildir}/${name}/new"
22 mkdir -p "${maildir}/${name}/tmp"
23 printf 'Mailbox %s\n' "${name}"
24 SFEED_MBOX_CONTENT=1 $bin "${d}" | formail -s procmail "${procmailconfig}"
25 done