diff options
author | jbj <devnull@localhost> | 2000-02-06 18:07:12 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-02-06 18:07:12 +0000 |
commit | 016eacb22a8decd8f37473c8559949c93135650e (patch) | |
tree | 60612980026d230b21334a71f59899b8ed792416 /scripts | |
parent | def2638570a88d6491d3e62365998228ec3ad75d (diff) | |
download | librpm-tizen-016eacb22a8decd8f37473c8559949c93135650e.tar.gz librpm-tizen-016eacb22a8decd8f37473c8559949c93135650e.tar.bz2 librpm-tizen-016eacb22a8decd8f37473c8559949c93135650e.zip |
Insure compression with -9 and handle symlinks correctly.
CVS patchset: 3542
CVS date: 2000/02/06 18:07:12
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/brp-compress | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/brp-compress b/scripts/brp-compress index 5d4710980..7e1e0a272 100755 --- a/scripts/brp-compress +++ b/scripts/brp-compress @@ -7,13 +7,27 @@ fi cd $RPM_BUILD_ROOT # Compress man pages -COMPRESS=gzip +COMPRESS="gzip -9" +COMPRESS_EXT=.gz for d in ./usr/man/man* ./usr/man/*/man* ./usr/X11R6/man/man* ./usr/lib/perl5/man/man* do [ -d $d ] || continue - for f in `find $d -type f | sed -e 's/[^ ]*\.gz//' -e 's/[^ ]*\.bz2//'` + for f in `find $d -type f` do - $COMPRESS $f + case "$f" in + *.Z) gunzip $f; b=`echo $f | sed -e 's/\.Z$//'`;; + *.gz) gunzip $f; b=`echo $f | sed -e 's/\.gz$//'`;; + *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;; + *) b=$f;; + esac + $COMPRESS $b + done + for f in `find $d -type l` + do + l=`ls -l $f | awk '{ print $11 }' | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'` + rm -f $f + b=`echo $f | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'` + ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT done done |