updated git and svn scripts
[xrzperl.git] / gsvn-host
blob4ffeea565625ef969d653e6db3461dee5f8891a0
1 #!/usr/bin/perl -w
2 # $Id$
3 use strict;
4 require v5.10.0;
5 our $VERSION = 'v0.1';
7 my $url = `git config --get svn-remote.svn.url`;
8 chomp($url) if($url);
9 my $fetch = `git config --get svn-remote.svn.fetch`;
10 chomp($fetch) if($fetch);
12 die("No svn-remote.svn.url found!\n") unless($url);
13 if($fetch) {
14 $fetch =~ s/:.+$//;
15 $fetch =~ s/\/trunk\/?$//;
17 else {
18 $fetch = "";
21 print STDERR "svn-remote: ";
22 print "$url/$fetch\n";
25 __END__
27 =pod
29 =head1 NAME
31 gsvn-host - PERL script
33 =head1 SYNOPSIS
35 gsvn-host [options] ...
37 =head1 OPTIONS
39 =over 12
41 =item B<--version>
43 Print version infomation.
45 =item B<-h>,B<--help>
47 Print a brief help message and exits.
49 =item B<--manual>,B<--man>
51 View application manual
53 =item B<--edit-me>
55 Invoke 'editor' against the source
57 =back
59 =head1 DESCRIPTION
61 ___DESC___
63 =head1 CHANGELOG
65 2010-11-23 23:30 xiaoranzzz <xiaoranzzz@myplace.hell>
67 * file created.
69 =head1 AUTHOR
71 xiaoranzzz <xiaoranzzz@myplace.hell>
73 =cut
75 # vim:filetype=perl