updated git and svn scripts
[xrzperl.git] / urlrule_task_newly
blobd77c03f6b9719be6eed488d3467721068f70acde
1 #!/usr/bin/perl -w
2 # $Id$
3 use strict;
4 require v5.10.0;
5 our $VERSION = 'v0.1';
7 BEGIN
9 my $PROGRAM_DIR = $0;
10 $PROGRAM_DIR =~ s/[^\/\\]+$//;
11 $PROGRAM_DIR = "./" unless($PROGRAM_DIR);
12 unshift @INC,
13 map "$PROGRAM_DIR$_",qw{modules lib ../modules ..lib};
16 my %OPTS;
17 my @OPTIONS = qw/help|h|? version|ver edit-me manual|man/;
19 if(@ARGV)
21 require Getopt::Long;
22 require MyPlace::Usage;
23 Getopt::Long::GetOptions(\%OPTS,@OPTIONS);
24 MyPlace::Usage::Process(\%OPTS,$VERSION);
27 my @query = (
28 '/.+/',
29 '/.+/',
30 '/.+/',
31 'newly',
34 my $cmd = 'ECHO';
36 if(@ARGV)
38 $cmd = shift;
39 if($cmd =~ m/^(DOWNLOAD|ECHO|DUMP)$/i)
41 $cmd = uc($cmd);
43 else
45 unshift @ARGV,$cmd;
46 $cmd = 'ECHO';
48 my $max_count = 3;
49 my $current = 0;
50 while(@ARGV && $current < $max_count)
52 $query[$current] = shift;
53 $current++;
56 print STDERR join(' ',('urlrule_task',$cmd,join(',',@query))),"\n";
57 exec('urlrule_task',$cmd,join(',',@query));
60 __END__
62 =pod
64 =head1 NAME
66 urlrule_task_newly - PERL script
68 =head1 SYNOPSIS
70 urlrule_task_newly [options] ...
72 =head1 OPTIONS
74 =over 12
76 =item B<--version>
78 Print version infomation.
80 =item B<-h>,B<--help>
82 Print a brief help message and exits.
84 =item B<--manual>,B<--man>
86 View application manual
88 =item B<--edit-me>
90 Invoke 'editor' against the source
92 =back
94 =head1 DESCRIPTION
96 ___DESC___
98 =head1 CHANGELOG
100 2010-06-22 xiaoranzzz <xiaoranzzz@myplace.hell>
102 * file created.
104 =head1 AUTHOR
106 xiaoranzzz <xiaoranzzz@myplace.hell>
108 =cut