diff --git a/repo2html b/repo2html index 159bafb..7d64bc4 100755 --- a/repo2html +++ b/repo2html @@ -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" diff --git a/rss b/rss index 1ed7dae..8a89326 100755 --- a/rss +++ b/rss @@ -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 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