[Privoxy-commits] [privoxy] 03/04: create-package-feed.pl: Properly deal with another directory level
User Git
git at git.privoxy.org
Tue Jun 16 17:26:38 CEST 2026
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit fcccd92a4e343c7fa5f37d7e40f4f49913f2d366
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue Jun 16 17:16:38 2026 +0200
create-package-feed.pl: Properly deal with another directory level
This is necessary for the macOS package for Privoxy 4.2.0.
---
utils/create-package-feed.pl | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/utils/create-package-feed.pl b/utils/create-package-feed.pl
index 68781adb..285a244f 100755
--- a/utils/create-package-feed.pl
+++ b/utils/create-package-feed.pl
@@ -101,20 +101,37 @@ sub get_released_files($) {
while (my $fi2 = readdir($D2)) {
next if ($fi2 =~ m/^\./);
- # Start listing /OS/Version/FILE
+ # Start listing /OS/Version/FILE or /OS/Version/architecture/FILE
opendir(my $D3, $scan_dir . $fi1 . '/' . $fi2 . '/')
or die "Can't open 3rd directory! /$fi1/$fi2";
while (my $fi3 = readdir($D3)) {
next if ($fi3 =~ m/^\./);
$target = $scan_dir . $fi1 . '/' . $fi2 . '/' . $fi3;
next if (!-e $target); # skip if file is not exist
+ if (-d $target) {
+ opendir(my $D4, $target) or die "Can't open 4th directory $target";
+ while (my $fi4 = readdir($D4)) {
+ next if ($fi4 =~ m/^\./);
+ $target = $scan_dir . $fi1 . '/' . $fi2 . '/' . $fi3 . '/' . $fi4;
+ next if (! -e $target); # skip if file does not exist
- $target_uri = $fi1 . '/' . $fi2 . '/' . $fi3;
- $target_time = (stat $target)[9];
+ $target_uri = $fi1 . '/' . $fi2 . '/' . $fi3 . '/' . $fi4;
+ $target_time = (stat $target)[9];
- $Array[$i] = ([$target_time, $target, $target_uri]);
+ $Array[$i] = ([$target_time, $target, $target_uri]);
- $i++;
+ $i++;
+ }
+ closedir($D4);
+ } else {
+
+ $target_uri = $fi1 . '/' . $fi2 . '/' . $fi3;
+ $target_time = (stat $target)[9];
+
+ $Array[$i] = ([$target_time, $target, $target_uri]);
+
+ $i++;
+ }
}
closedir($D3);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list