diff options
Diffstat (limited to 'leo.pl')
-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"; +} |