commit 26da9fa412d8d1dec351b99f04f7b8084bcff99f
parent 673935356f387529cae25ab791bc88e00fd58c9b
Author: Jacob Pipkin <j@dawnrazor.net>
Date: Sun, 2 Sep 2012 03:39:22 -0500
recursive chown root after rsync
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
@@ -48,8 +48,8 @@ use Sort::Versions;
use Digest::MD5;
use File::Copy;
use File::Path qw(make_path remove_tree);
-use Fcntl;
use File::Temp qw(tempdir tempfile);
+use File::Find;
use Fcntl qw(F_SETFD F_GETFD);
use feature 'say';
@@ -157,6 +157,11 @@ sub rsync_sbo_tree () {
my @arg = ('rsync', '-a', '--exclude=*.tar.gz', '--exclude=*.tar.gz.asc');
push @arg, "rsync://slackbuilds.org/slackbuilds/$slk_version/*";
my $out = system @arg, $config{SBO_HOME};
+ my $wanted = sub {
+ $File::Find::name ? chown 0, 0, $File::Find::name
+ : chown 0, 0, $File::Find::dir;
+ };
+ find ($wanted, $config{SBO_HOME});
say 'Finished.' and return $out;
}