10 $PROGRAM_DIR =~ s/[^\/\\]+$//;
11 $PROGRAM_DIR = "./" unless($PROGRAM_DIR);
13 map "$PROGRAM_DIR$_",qw{modules lib
../modules
..lib
};
17 my @OPTIONS = qw
/help|h|? version|ver edit-me manual|man/;
22 require MyPlace
::Usage
;
23 Getopt
::Long
::GetOptions
(\
%OPTS,@OPTIONS);
24 MyPlace
::Usage
::Process
(\
%OPTS,$VERSION);
28 require MyPlace
::Usage
;
29 MyPlace
::Usage
::PrintHelp
();
35 die("Usage: $0 svn_repo_url target\n");
39 foreach my $fn ("authors",".authors","~/gsvn/authors","~/.authors") {
50 if(!($authors and -f
$authors)) {
51 die("NO authors file found\n");
53 print "[1/2] cloning $url to [$target] ...\n";
54 if(system(qw
/git svn clone -s -A/,$authors,$url,$target,@ARGV) != 0) {
55 die("fatal: while clone $url to [$target]\n");
57 print "[2/2] init repos of [$target] ...\n";
58 if(system("gsvn-init-repos",$target)!=0) {
59 die("fatal: while init repos of [$target]\n");
69 gsvn-clone - PERL script
73 gsvn-clone [options] <svn repo url> [target directory] [git svn clone options...]
81 Print version infomation.
85 Print a brief help message and exits.
87 =item B<--manual>,B<--man>
89 View application manual
93 Invoke 'editor' against the source
103 2010-11-02 xiaoranzzz <xiaoranzzz@myplace.hell>
107 2010-11-03 xiaoranzzz <xiaoranzzz@myplace.hell>
108 * add usage information
112 xiaoranzzz <xiaoranzzz@myplace.hell>