Added configurable RSS count (default all)
parent
7c3e1cae31
commit
7c5fb75352
|
@ -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
7
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
|
|||
</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
|
||||
|
|
Loading…
Reference in New Issue