]> git.plutz.net Git - busy/blob - pages/Subversion.sh
porting busy to confetti framework
[busy] / pages / Subversion.sh
1 #!/bin/sh
2
3 # Copyright 2014 Paul Hänsch
4 #
5 # This file is part of Busy
6
7 # Busy is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 # Busy is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU Affero General Public License for more details.
16
17 # You should have received a copy of the GNU Affero General Public License
18 # along with Busy. If not, see <http://www.gnu.org/licenses/>. 
19
20 url="$(echo "$_GET[\"i\"]" |sed -rn '1{s:\t: :g;s:\r::g;s:\\:\\\\:g;p}')"
21 rev="$(echo "$_GET[\"r\"]" |sed -rn '1{/^[0-9]+$/p}')"
22
23 baseuri=$(sed -rn 's:^svnRepo=(.*)$:\1:p' project.meta)
24 lastrev=$(svn info "$baseuri" |sed -rn 's;^Revision: *([0-9]+);\1;p')
25 [ -z "$rev" ] && rev="$lastrev"
26
27 case "$1" in
28   title)
29     echo "Code"
30   ;;
31   css)
32     cat ${_EXEC}/templates/Subversion.css
33   ;;
34   body)
35     #. ${_EXEC}/templates/text_subversion.sh
36     . ${_EXEC}/templates/Subversion.page
37   ;;
38 esac
39