2023-02-26 00:01:58
This commit is contained in:
33
launch
Executable file
33
launch
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/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;
|
||||||
|
}
|
||||||
8
src/glob.pl
Executable file
8
src/glob.pl
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
chdir("/home/elex/") or die("$!");
|
||||||
|
my @files = glob("*");
|
||||||
|
for (@files){
|
||||||
|
print "$_\n";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user