From 82f561ce59177878736b15a09d57d32446acf27e Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Mon, 28 Feb 2000 14:39:18 +0000 Subject: * use EXCLUDE_FROM_COMPRESS env variable to list files to exlcude from compression. --- compress_files | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'compress_files') diff --git a/compress_files b/compress_files index eaaec0d..37f5c35 100755 --- a/compress_files +++ b/compress_files @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl #--------------------------------------------------------------- # Project : Linux-Mandrake # Module : spec-helper @@ -113,6 +113,22 @@ foreach $sofile (@sofiles) { push @files, split(/\n/,`find usr/info usr/share/info usr/man usr/share/man usr/X11*/man usr/lib/perl5/man -type f ! -name "*.gz" -a ! -name "*.bz2" 2>/dev/null || true`); +# Exclude files from compression. +if (@files && defined($ENV{EXCLUDE_FROM_COMPRESS})) { + @new=(); + foreach (@files) { + $ok=1; + foreach $x (split(' ',$ENV{EXCLUDE_FROM_COMPRESS})) { + if (/\Q$x\E/) { + $ok=''; + last; + } + } + push @new,$_ if $ok; + } + @files=@new; +} + # Look for files with hard links. If we are going to compress both, # we can preserve the hard link across the compression and save # space in the end. -- cgit v1.2.1