diff options
author | Andinus <andinus@nand.sh> | 2020-08-27 13:50:21 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-08-27 13:50:21 +0530 |
commit | 61c874b22e5694aa5a30725db1a68080acca7174 (patch) | |
tree | f9c336556df2909e6653fa445657b8b21da0b1d8 | |
parent | 3368af177773d26d1c507a2c2372b3bbfcff2fd8 (diff) | |
download | leo-61c874b22e5694aa5a30725db1a68080acca7174.tar.gz |
Move tar_create, tar_list & ymd to the end
These will mostly remain unchanged so I moved them to the end.
-rwxr-xr-x | leo.pl | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/leo.pl b/leo.pl index 64b461f..44266db 100755 --- a/leo.pl +++ b/leo.pl @@ -72,23 +72,6 @@ sub archive { print "\n" and tar_list($tar_file) if $options{verbose}; } -sub tar_create { run3 ["/bin/tar" , "cf", @_]; } -sub tar_list { run3 ["/bin/tar", "tvf", @_]; } - -sub ymd { - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = - localtime(time); - - $year += 1900; # $year contains the number of years since 1900. - - # $mon the month in the range 0..11 , with 0 indicating January - # and 11 indicating December. - my @months = qw( 01 02 03 04 05 06 07 08 09 10 11 12 ); - my $month = $months[$mon]; - - return "$year-$month-$mday"; -} - sub HelpMessage { say qq{Archive files to $archive_dir. @@ -118,3 +101,20 @@ if ( $ARGV[0] and $dispatch{ $ARGV[0] } ) { } else { die say "leo: no such option\n"; } + +sub tar_create { run3 ["/bin/tar" , "cf", @_]; } +sub tar_list { run3 ["/bin/tar", "tvf", @_]; } + +sub ymd { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime(time); + + $year += 1900; # $year contains the number of years since 1900. + + # $mon the month in the range 0..11 , with 0 indicating January + # and 11 indicating December. + my @months = qw( 01 02 03 04 05 06 07 08 09 10 11 12 ); + my $month = $months[$mon]; + + return "$year-$month-$mday"; +} |