Michael Schröder 2020-10-27 15:27:01 +00:00 committed by Git OBS Bridge
parent 1749f0e84d
commit e84d0febf7
2 changed files with 17 additions and 9 deletions

View File

@ -7,4 +7,4 @@
+ case $(file "$f") in *"image data"*) continue;; esac
case "$f" in
*.gz|*.Z) gunzip -f $f || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
*.gz|*.Z) gunzip -f "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;

View File

@ -1,5 +1,5 @@
--- ./scripts/brp-compress.orig 2020-05-28 10:04:25.075136894 +0000
+++ ./scripts/brp-compress 2020-09-30 12:35:24.462971247 +0000
+++ ./scripts/brp-compress 2020-10-27 15:23:57.970737863 +0000
@@ -5,6 +5,9 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_B
exit 0
fi
@ -41,7 +41,7 @@
for d in .${PREFIX}/man/man* .${PREFIX}/man/*/man* .${PREFIX}/info \
.${PREFIX}/share/man/man* .${PREFIX}/share/man/*/man* \
.${PREFIX}/share/info .${PREFIX}/kerberos/man \
@@ -21,36 +48,36 @@ for d in .${PREFIX}/man/man* .${PREFIX}/
@@ -21,40 +48,40 @@ for d in .${PREFIX}/man/man* .${PREFIX}/
.${PREFIX}/share/fish/man/man*
do
[ -d $d ] || continue
@ -55,10 +55,10 @@
- *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
- *.xz|*.lzma) unxz -f $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
- *.zst|*.zstd) unzstd -f --rm $f; b=`echo $f | sed -e 's/\.\(zst\|zstd\)$//'`;;
+ *.gz|*.Z) gunzip -f $f || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
+ *.bz2) bunzip2 -f $f || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.bz2$//'`;;
+ *.xz|*.lzma) unxz -f $f || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
+ *.zst|*.zstd) unzstd -f --rm $f || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(zst\|zstd\)$//'`;;
+ *.gz|*.Z) gunzip -f "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
+ *.bz2) bunzip2 -f "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.bz2$//'`;;
+ *.xz|*.lzma) unxz -f "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
+ *.zst|*.zstd) unzstd -f --rm "$f" || check_for_hard_link $d "$f"; b=`echo $f | sed -e 's/\.\(zst\|zstd\)$//'`;;
*) b=$f;;
esac
@ -87,5 +87,13 @@
- for f in `find $d -type l`
+ find $d -type l | while read f
do
l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
rm -f $f
- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
- rm -f $f
- b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
- ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT
+ l=`ls -l "$f" | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
+ rm -f "$f"
+ b=`echo "$f" | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\|zst\|zstd\)$//'`
+ ln -sf "$l$COMPRESS_EXT" "$b$COMPRESS_EXT"
done
done