From 007f0d702907272018b3cf4ef8470145cd51decd Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 13 Aug 2023 13:35:40 +0300 Subject: add perl modelines. remove filewalk --- Rexfile | 2 ++ frontends/Rexfile | 21 --------------------- playground/Rexfile | 4 +++- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/Rexfile b/Rexfile index 784daaa..7426000 100644 --- a/Rexfile +++ b/Rexfile @@ -1 +1,3 @@ require for <'*/Rexfile'>; + +# vim: syntax=perl diff --git a/frontends/Rexfile b/frontends/Rexfile index da679b2..8919a8c 100644 --- a/frontends/Rexfile +++ b/frontends/Rexfile @@ -55,27 +55,6 @@ our $is_primary = sub { $fqdns->($ipv4) eq 'blowfish.buetow.org'; }; -our $filewalk; -our $filewalk = sub { - my $dir = shift; - my @files; - - opendir my $dh, $dir or die $!; - while (my $entry = readdir $dh) { - next if $entry eq '.' or $entry eq '..'; - if (-d "$dir/$entry") { - push @files, $_ for $filewalk->("$dir/$entry"); - } elsif (-f "$dir/$entry") { - push @files, "$dir/$entry"; - } else { - Rex::Logger::info("Unsupported file type for $dir/$entry", 'error'); - } - } - closedir $dh; - - return @files; -}; - # The secret store. Note to myself: "geheim cat rexfilesecrets.txt" our $secrets = sub { read_file './secrets/' . shift }; diff --git a/playground/Rexfile b/playground/Rexfile index 6fe5f8c..056a82e 100644 --- a/playground/Rexfile +++ b/playground/Rexfile @@ -19,4 +19,6 @@ task 'openbsd_cron_test', group => 'openbsd_canary', sub { day_of_week => '*', command => '/path/to/your/cronjob', }; -}; \ No newline at end of file +}; + +# vim: syntax=perl -- cgit v1.2.3