File: svnweb-install

package info (click to toggle)
libsvn-web-perl 0.63-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 736 kB
  • sloc: perl: 1,987; sh: 73; makefile: 11
file content (140 lines) | stat: -rw-r--r-- 3,136 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/usr/bin/perl
use strict;
use Config;
use File::Copy;
use File::Basename;
use File::Find;

BEGIN {

    # This is a nasty hack.  SVN::Core has a bug.  "perl -MSVN::Core -c -e 1"
    # will dump core.  Something to do with the interaction between "-c"
    # running BEGIN blocks but not running END blocks, or similar.
    #
    # Anyway, we want to test to make sure this script compiles cleanly.
    # And we want to use SVN::Web.  Since the two are mutually exclusive,
    # only use SVN::Web (and hence SVN::Core) if we're not compiling.
    if(!$^C) {
        require SVN::Web;
    }
}

my $version = SVN::Web->VERSION();

die "already have config.yaml" if -e 'config.yaml';

open my $fh, '>', 'config.yaml';

print $fh <<END;
version: $version

# Actions, the classes that implement them, and where they should appear
# in the action menu
actions:
  blame:
    class: SVN::Web::Blame
    action_menu:
      show:
        - file 
      link_text: (view blame)
  browse:
    class: SVN::Web::Browse
    action_menu:
      show:
        - directory
      link_text: (browse directory)
  checkout:
    class: SVN::Web::Checkout
    action_menu:
      show:
        - file
      link_text: (checkout)
  diff:
    class: SVN::Web::Diff
  list:
    class: SVN::Web::List
    opts:
      public_repos_uri: hide_local
  log:
    class: SVN::Web::Log
    action_menu:
      show:
        - file
        - directory
      link_text: (view revision log)
  revision:
    class: SVN::Web::Revision
  rss:
    class: SVN::Web::RSS
    action_menu:
      show:
        - file
        - directory
      link_text: (rss)
      head_only: 1
      icon: /css/trac/feed-icon-16x16.png
  view:
    class: SVN::Web::View
    action_menu:
      show:
        - file
      link_text: (view file)

# Languages.  Specify the localisation files, and how they should be described
# in the web interface.  You probably don't want to change this.
languages:
  en: English
  fr: Fran&ccedil;ais
  zh_cn: Chinese (Simplified)
  zh_tw: Chinese (Traditional)

# Set the default language here.  If not set, English is used
#default_language: fr

# Time and date formatting
timedate_format: '%Y/%m/%d %H:%M:%S'

# Timezone.  Uncomment the next line to use the server's timezone instead
# of UTC.  Or, specify a literal timezone (C<timezone: 'EST'> for example)
#timezone: local

# set your repository path below:
#
#repos:
#  test: '/tmp/svnweb-test'
#  test2: '/tmp/svnweb-test2'
#
# or a parent path contains repositories
#
#reposparent: '/path/to/repositories'
#
# if you set a parent you can block specific repositories
# like this:
#
#block:
#  - 'blocked1'
#  - 'blocked2'
#

END

close $fh;

# XXX: export the template too

print "SVN::Web now installed! please see config.yaml\n";

=head1 COPYRIGHT

Copyright 2003-2004 by Chia-liang Kao C<< <clkao@clkao.org> >>.

Copyright 2005-2007 by Nik Clayton C<< <nik@FreeBSD.org> >>.

Copyright 2012 by Dean Hamstead C<< <dean@fragfest.com.au> >>.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

See L<http://www.perl.com/perl/misc/Artistic.html>

=cut