App-GitKtti
view release on metacpan or search on metacpan
lib/App/GitKtti.pm view on Meta::CPAN
my $new_repository = $_[1];
my $ret = 99;
my $temp_repo = "";
if ( $old_repository eq "" ) {
print("ERROR: old_repository is empty !\n");
exit(2);
}
if ( $new_repository eq "" ) {
print("ERROR: new_repository is empty !\n");
exit(2);
}
$temp_repo = "TEMPREPO_" . strftime("%Y%m%d_%H%M%S", localtime);
## Step 1: clone old repository
launch("git clone --bare $old_repository $temp_repo", \$ret);
if ( $ret ne 0 ) {
print("ERROR: clone failed ! Aborted !\n");
exit(2);
}
### Step 2: push to new repository
chdir($temp_repo);
print("now here : " . getcwd() . "\n");
launch("git push --mirror $new_repository", \$ret);
if ( $ret ne 0 ) {
print("ERROR: push failed ! Aborted !\n");
exit(2);
}
## Step 3: clean temp repositoy
chdir("..");
print("now here : " . getcwd() . "\n");
launch("rm -rf $temp_repo", \$ret);
if ( $ret ne 0 ) {
print("ERROR: cd failed ! Aborted !\n");
exit(2);
}
print("Repository successfuly duplicated !\n");
print("From [$old_repository]\n");
print("To [$new_repository]\n");
}
sub showLogo {
print "\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;6;4;10m \033[0m\0...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;8;6;15m \033[0m\033[38;2;68;48;129m'\033[0m\033[38;2;116;83;225m:...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;15;11;26m \033[0m\033[38;2;75;53;141m'\033[0m\033[38;2;117;84;229mc\033[0m\033[38;2;120;89;238mc\033[0m\033[38;2;...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;19;14;34m \033[0m\033[38;2;81;57;153m'\033[0m\033[38;2;120;86;234mc\033[0m\033[38;2;120;88;238mc\033[0m\033[38;2;119;90;239mc\033[0m\033[38;2;118;91;239mc\033[0m...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;2;2;4m \033[0m\033[38;2;83;57;155m,\033[0m\033[38;2;121;85;236mc\033[0m\033[38;2;120;87;239mc\033[0m\033[38;2;118;89;239mc\033[0m\033[38;2;117;91;239mc\033[0m\033[38;2;116;93;240mc\033[0m\033[38;2;115;95;240mc...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;10;7;19m \033[0m\033[38;2;121;86;238mc\033[0m\033[38;2;119;88;239mc\033[0m\033[38;2;117;90;239mc\033[0m\033[38;2;116;93;240mc\033[0m\033[38;2;115;95;241mc\033[0m\033[38;2;113;97;241mc\033[0m\033[38;2;112;99;24...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;6;6;6m \033[0m\033[38;2;67;67;67m \033[0m\033[38;2;65;51;133m'\033[0m\033[38;2;115;95;240mc\033[0m\033[38;2;113;97;240mc\033[0m\033[38;2;112;99;241mc\033[0m\033[38;2;110;102;241mc\033[0m\033[38;2;108;104;242mc...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;14;14;14m \033[0m\033[38;2;66;66;66m \033[0m\033[38;2;54;49;117m.\033[0m\033[38;2;109;103;242mc\033[0m\033[38;2;107;106;242ml\033[0m\033[38;2;105;108;242ml\033[0...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;11;11;11m \033[0m\033[38;2;61;61;61m \033[0m\033[38;2;35;37;81m.\033[0m\033[38;2;103;112;243ml\033[0m\033[38;2;10...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;7;7;7m \033[0m\033[38;2;57;57;57m \033[0m\033[38;2;27;32;65m.\033...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;5;5;5m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
\033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\033[38;2;0;0;0m \033[0m\03...
";
}
1;
( run in 1.188 second using v1.01-cache-2.11-cpan-39bf76dae61 )