#!/bin/zsh
url="$(sed -rn 's:\+: :g;s:%:\\x:g;s:^(.*&)?i=([^&]+)(&.*)?$:\2:p' <<<"${QUERY_STRING}")"
url="$(echo -e "${url}" |sed -rn '1{s:\t: :g;s:\r::g;s:\\:\\\\:g;p}')"
-rev="$(sed -rn '/^(.*&)?r=([0-9]+)(&.*)?$/{s:^(.*&)?r=([0-9]+)(&.*)?$:\2:;s:\+: :g;s:%:\\x:g;p}' <<<"${QUERY_STRING}")"
+rev="$(sed -rn 's:\+: :g;s:%:\\x:g;s:^(.*&)?r=([0-9]+)(&.*)?$:\2:p' <<<"${QUERY_STRING}")"
+#rev="$(sed -rn '/^(.*&)?r=([0-9]+)(&.*)?$/{s:^(.*&)?r=([0-9]+)(&.*)?$:\2:;s:\+: :g;s:%:\\x:g;p}' <<<"${QUERY_STRING}")"
baseuri=$(sed -rn 's:^svnRepo=(.*)$:\1:p' project.meta)
lastrev=$(svn info "$baseuri" |sed -rn 's;^Revision: *([0-9]+);\1;p')
echo "<a href='?p=Subversion&i=$tmp&r=$rev'>/$(basename "$tmp")</a> "
tmp=$(dirname "$tmp")/
done |tac)
- <hr><!---------------------------------------------------------------------------------->
+ <hr><!----------------------------------------------->
<h1>Revisions:</h1>
$(for i in {1.."$lastrev"}; do
echo "<a href='?p=Subversion&i=$url&r=$i'>$i</a>"