diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-04-19 15:02:11 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-04-19 15:02:11 +0000 |
commit | efdd5965c477616be56b9f56a8613645ff2dac41 (patch) | |
tree | 70ad24cd2241eaa3055fb31eac58c0212a7252e1 /move/collect-directories-to-create.pl | |
parent | b60585a154601978f6070123e50f6977c1d9fdf9 (diff) | |
download | drakx-efdd5965c477616be56b9f56a8613645ff2dac41.tar drakx-efdd5965c477616be56b9f56a8613645ff2dac41.tar.gz drakx-efdd5965c477616be56b9f56a8613645ff2dac41.tar.bz2 drakx-efdd5965c477616be56b9f56a8613645ff2dac41.tar.xz drakx-efdd5965c477616be56b9f56a8613645ff2dac41.zip |
when creating directories, keep rights & uid & gid (esp. for armagetron)
Diffstat (limited to 'move/collect-directories-to-create.pl')
-rwxr-xr-x | move/collect-directories-to-create.pl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/move/collect-directories-to-create.pl b/move/collect-directories-to-create.pl index c6e208c57..7a5cfd283 100755 --- a/move/collect-directories-to-create.pl +++ b/move/collect-directories-to-create.pl @@ -7,11 +7,9 @@ use MDK::Common; #- in which they try to write doesn't exist. better collect them #- at build time so that drakx startup can create them. -my @list = map { if_(m|^\Q$ARGV[0]\E(.*)$|, $1) } `find $ARGV[0]/{etc,var} -type d`; -my @final; -foreach my $e (sort { length($b) <=> length($a) } @list) { - any { /^\Q$e\E/ } @final and next; - push @final, $e; +chdir $ARGV[0]; +foreach (`find etc var -type d`) { + chomp; + my @l = stat($_); + printf "%o %d %d %s\n", $l[2] & 07777, $l[4], $l[5], $_; } - -print "$_\n" foreach sort @final; |