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 print STDERR
join(" ",@_),"\n";
29 return system(@_) == 0;
33 return "$_[0]\@gmail.com";
37 die("Usage: $0 <username>\n") unless($u);
38 if("eotect" =~ m/^$u/) {
39 run
(qw
/git config user.name/,"Nahn Eotect");
40 run
(qw
/git config user.email/,mm
('eotect'));
42 elsif("xiaoranzzz" =~ m/^$u/) {
43 run
(qw
/git config user.name xiaoranzzz/);
44 run
(qw
/git config user.email/,mm
("xiaoranzzz"));
46 elsif("nahncm" =~ m/^$u/) {
47 run
(qw
/git config user.name/,"Coding Machine");
48 run
(qw
/git config user.email/,mm
("nahncm"));
51 print STDERR
"Can't not found user\n";
61 git-config-user - PERL script
65 git-config-user [options] ...
73 Print version infomation.
77 Print a brief help message and exits.
79 =item B<--manual>,B<--man>
81 View application manual
85 Invoke 'editor' against the source
95 2010-10-31 xiaoranzzz <xiaoranzzz@myplace.hell>
101 xiaoranzzz <xiaoranzzz@myplace.hell>