1
0
Fork 0

Added configurable RSS count (default all)

master
Mike Gerwitz 2012-10-19 20:13:53 -04:00
parent 7c3e1cae31
commit 7c5fb75352
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
2 changed files with 8 additions and 2 deletions

View File

@ -54,6 +54,7 @@ while getopts t:d:c:l:f: opt; do
c) copyright="$OPTARG";;
l) license="$OPTARG";;
f) msgfmt="$OPTARG";;
R) rss_count="$OPTARG";;
?) exit 64;;
esac
done
@ -79,5 +80,5 @@ export title desc copyright license msgfmt
# pass commit list to the HTML and RSS processors
"$repotype"/list | tee \
>( ./rss "$repotype" "$url_root" > "$path_out/rss.xml" ) \
>( ./rss "$repotype" "$url_root" "$rss_count" > "$path_out/rss.xml" ) \
| ./processor "$repotype" "$path_out"

7
rss
View File

@ -22,7 +22,7 @@
repotype="${1?Missing repository type}"
url="${2?Missing URL}"
count=10
count="${3:-0}"
# provide default message formatter if necessary
msgfmt="${msgfmt:-./msgfmt}"
@ -68,6 +68,11 @@ while read hash commit ts id subject; do
</description>
</item>
EOE
# continue until we reach the requested number (note that we increment before
# the check, meaning that if the count is 0, then we will output every commit
((i++))
[ "$i" -eq "$count" ] && break
done
# footer