9 our $PROGRAM_DIR = $ENV{XR_PERL_SOURCE_DIR
};
10 unless($PROGRAM_DIR) {
12 $PROGRAM_DIR =~ s/[^\/\\]+$//;
13 $PROGRAM_DIR =~ s/\/+$//;
14 $PROGRAM_DIR = "." unless($PROGRAM_DIR);
17 map "$PROGRAM_DIR/$_",qw{modules lib
../modules
..lib
};
21 my @OPTIONS = qw
/help|h|? version|ver edit-me manual|man/;
26 require MyPlace
::Usage
;
27 Getopt
::Long
::GetOptions
(\
%OPTS,@OPTIONS);
28 MyPlace
::Usage
::Process
(\
%OPTS,$VERSION);
32 require MyPlace
::Usage
;
33 MyPlace
::Usage
::PrintHelp
();
38 my $exit = system(@_);
39 die("fatal error: $! while executing [",join(" ",@_),"]\n") if($exit);
45 print STDERR
"creating local repository $DEST...\n";
46 run
(qw
/svnadmin create/,$DEST);
47 my $hook = "$DEST/hooks/pre-revprop-change";
48 print STDERR
"creating pre-revprop-change hook in $DEST...\n";
49 open FO
,'>',$hook or die("fatal error\n");
50 print FO
"#!/bin/sh\nexit 0\n";
52 run
(qw
/chmod a+x/,$hook);
64 if($action eq 'load') {
66 run
('svnadmin','load',$dst);
69 run
('svnadmin',$action,$dst,@ARGV);
92 Print version infomation.
96 Print a brief help message and exits.
98 =item B<--manual>,B<--man>
100 View application manual
104 Invoke 'editor' against the source
114 2010-11-21 03:48 xiaoranzzz <xiaoranzzz@myplace.hell>
120 xiaoranzzz <xiaoranzzz@myplace.hell>