summaryrefslogtreecommitdiffstats
path: root/move/tools
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-19 22:22:43 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-19 22:22:43 +0000
commit6c63406c04b2cc66258dfe117373adc392e80017 (patch)
tree01dc58f045adbef7f857635b5505654345c22535 /move/tools
parent451de13005412568a5800480b140e67721dc61cc (diff)
downloaddrakx-backup-do-not-use-6c63406c04b2cc66258dfe117373adc392e80017.tar
drakx-backup-do-not-use-6c63406c04b2cc66258dfe117373adc392e80017.tar.gz
drakx-backup-do-not-use-6c63406c04b2cc66258dfe117373adc392e80017.tar.bz2
drakx-backup-do-not-use-6c63406c04b2cc66258dfe117373adc392e80017.tar.xz
drakx-backup-do-not-use-6c63406c04b2cc66258dfe117373adc392e80017.zip
add
check if files are more recent (fc-cache will slow down starting of drakx)
Diffstat (limited to 'move/tools')
-rw-r--r--move/tools/check-fc-cache.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/move/tools/check-fc-cache.pl b/move/tools/check-fc-cache.pl
new file mode 100644
index 000000000..42902835f
--- /dev/null
+++ b/move/tools/check-fc-cache.pl
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+# check if files are more recent (fc-cache will slow down starting of drakx)
+
+use MDK::Common;
+
+sub stat_ {
+ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat $_[0];
+ max($mtime, $ctime);
+}
+
+my $prefix = $ARGV[0] || '/tmp/live_tree';
+
+my @conf = cat_("$prefix/etc/fonts/fonts.conf");
+
+foreach my $line (@conf) {
+ while ($line =~ m|<dir>([^<]+)</dir|g) {
+ my $dir = $1;
+ $dir =~ m|^/| or next;
+ print "dir $prefix$dir\n";
+ foreach my $d (chomp_(`find $prefix$dir -type d 2>/dev/null`)) {
+ my $ref = stat_("$d/fonts.cache-1");
+ stat_($_) > $ref and print "\t$_\n" foreach glob("$d/*");
+ }
+ }
+}
+