Files
perl-examples/launch
2023-02-26 00:03:40 +09:00

32 lines
533 B
Perl
Executable File

#!/usr/bin/perl
use strict;
use lib "/media/elex/UltraFit/Scripts/my-scripts/perl/modules";
use MyTime;
my $doc = <<DOC;
launch <option>
* git - add, commit, push
* mod - chmod a+x *.pl
DOC
sub git {
my $now = &MyTime::ymdhms;
system("git add -A");
system("git commit -m '$now'");
system("git push -u origin");
}
sub chmod{
system("chmod a+x *src/*.pl");
}
my $argc = $#ARGV + 1;
my $argv1 = @ARGV[0];
if ($argv1 eq "git"){
&git;
} elsif ($argv1 eq "mod") {
&chmod;
} else {
print $doc;
}