2 url="$(egrep -o '(^|&)(i=).+(&|$)' <<<"${QUERY_STRING}" |sed -r 's:^&?i=::;s:&.*::;s:\+: :g;s:%:\\x:g')"
3 url="$(echo -e "${url}" |sed 's:\t: :g;s:\r::g;s:\\:\\\\:g' |head -n1)"
4 rev="$(egrep -o '(^|&)(r=)[0-9]+(&|$)' <<<"${QUERY_STRING}" |tr -d 'r=&')"
6 baseuri=$(egrep '^repo=.*$' project.meta |cut -d= -f2-)
7 lastrev=$(svn info "$baseuri" |egrep '^Revision:' |cut -d\ -f2)
8 [ -z "$rev" ] && rev="$lastrev"
13 <a href='?p=Subversion&i=/&r=$rev'>[root]</a>
16 until [ -z "$tmp" -o "$tmp" = // ]; do
17 echo "<a href='?p=Subversion&i=$tmp&r=$rev'>/$(basename "$tmp")</a> "
18 tmp=$(dirname "$tmp")/
20 echo '<hr><h1>Revisions:</h1>'
21 for i in {1.."$lastrev"}; do
22 echo "<a href='?p=Subversion&i=$url&r=$i'>$i</a>"
28 <div id="RIGHT"></div>
31 <div class='wikitext'><h1>$(basename "$url"), Revision "$rev":</h1>
33 if (egrep -q '^(.*/|)$' <<<"$url"); then
34 svn ls -r "$rev" "${baseuri}/${url}" |sed -r "s:^.*$:<a href='?p=Subversion\&i=$url/&\&r=$rev'>&</a><br>:g"
37 lang=$(source-highlight --lang-list |cut -d\ -f1 |grep -x "$(sed 's:.*\.::g' <<<"$url")" || echo sh)
38 grep -q '\.' <<<"$url" || lang=txt
39 svn cat -r "$rev" "${baseuri}/${url}" |source-highlight -s "$lang" #|sed 's:<:\<:g;s:>:\>:g;'