5 # find Koha's Perl modules
6 # test carefully before changing this
8 eval { require "$FindBin::Bin/kohalib.pl" };
16 qw/head_dir=s rel_2_2_dir=s help/
17 ) or die "\nHouston, we got a problem\n";
19 if (exists $opt{help}) {
21 Sync the Koha plugin with the appropriate files from HEAD. Assumes
22 that you've set up your Koha install to use CVS symlinked to the
25 Usage: sync_koha_plugin.pl --head_dir=<cvs head directory>
26 --rel_2_2_dir=<cvs rel_2_2 directory>
29 --head_dir: is the directory where your Koha HEAD cvs is checked out.
31 --rel_2_2_dir: is the directory where your Koha rel_2_2 cvs is checked
32 out and symlinked to your Koha install directories.
34 --help: show this help
40 # Configurable Variables
41 foreach my $option (qw/head_dir rel_2_2_dir/) {
42 if (not exists $opt{$option}) {
43 die 'option "', $option, '" is mandatory', "\n";
46 if (not -d $opt{$option}) {
47 die '"', $opt{$option}, '" must be an existing directory', "\n";
50 if (not $opt{$option} =~ m{^/}) {
51 die '--', $option, ' must be an absolute path', "\n";
58 $opt{head_dir}.'/C4/Biblio.pm',
59 $opt{rel_2_2_dir}.'/C4/'
63 $opt{head_dir}.'/C4/Context.pm',
64 $opt{rel_2_2_dir}.'/C4/'
68 $opt{head_dir}.'/C4/SearchMarc.pm',
69 $opt{rel_2_2_dir}.'/C4/'
73 $opt{head_dir}.'/C4/Log.pm',
74 $opt{rel_2_2_dir}.'/C4/'
79 $opt{head_dir}.'/C4/Review.pm',
80 $opt{rel_2_2_dir}.'/C4/'
84 $opt{head_dir}.'/misc/plugin/Search.pm',
85 $opt{rel_2_2_dir}.'/C4/'
91 $opt{head_dir}.'/cataloguing/addbiblio.pl',
92 $opt{rel_2_2_dir}.'/acqui.simple/addbiblio.pl'
96 $opt{head_dir}.'/cataloguing/additem.pl',
97 $opt{rel_2_2_dir}.'/acqui.simple/'
101 $opt{head_dir}.'/catalogue/detail.pl',
102 $opt{rel_2_2_dir}.'/'
106 $opt{head_dir}.'/catalogue/MARCdetail.pl',
107 $opt{rel_2_2_dir}.'/'
111 $opt{head_dir}.'/catalogue/ISBDdetail.pl',
112 $opt{rel_2_2_dir}.'/'
118 $opt{head_dir}.'/opac/opac-detail.pl',
119 $opt{rel_2_2_dir}.'/opac/'
123 $opt{head_dir}.'/opac/opac-MARCdetail.pl',
124 $opt{rel_2_2_dir}.'/opac/'
128 $opt{head_dir}.'/opac/opac-ISBDdetail.pl',
129 $opt{rel_2_2_dir}.'/opac/'
132 ## Add the symlink necessary due to changes in the dir structure
136 $opt{rel_2_2_dir}.'/koha-tmpl/intranet-tmpl/npl/en/acqui.simple',
137 $opt{rel_2_2_dir}.'/koha-tmpl/intranet-tmpl/npl/en/cataloguing'
140 ## Add the 'record.abs' symlink
144 $opt{head_dir}.'/misc/zebra/usmarc/collection.abs',
145 $opt{head_dir}.'/misc/zebra/usmarc/record.abs'
148 ## Create symlink from intranet/zebra to head zebra directory
152 $opt{head_dir}.'/misc/zebra/usmarc',
153 C4::Context->config("intranetdir").'/zebra'
156 print "Finished\n\nRemember, you still need to:
158 1. Edit moredetail.tmpl and detail.tmpl to allow for deletions
160 2. add <option value=''>Relevance</option> to the search
161 pages to sort by relevance by default