summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2009-08-04 00:34:31 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-08-10 10:04:45 +0300
commit3b7d3b0c19e2ea4f402bba8f014920eabe0415e0 (patch)
treebe88902b4927612ccb064cf5169f538c8d7b2976 /scripts
parentf6982a403b284012abc846d9f4e5155ad84fac35 (diff)
downloadlibrpm-tizen-3b7d3b0c19e2ea4f402bba8f014920eabe0415e0.tar.gz
librpm-tizen-3b7d3b0c19e2ea4f402bba8f014920eabe0415e0.tar.bz2
librpm-tizen-3b7d3b0c19e2ea4f402bba8f014920eabe0415e0.zip
Add *.xz and *.lzma recompress support to brp-compress.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/brp-compress10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/brp-compress b/scripts/brp-compress
index 28051d9fa..2c2823742 100755
--- a/scripts/brp-compress
+++ b/scripts/brp-compress
@@ -23,9 +23,9 @@ do
[ "`basename $f`" = "dir" ] && continue
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$//'`;;
+ *.gz|*.Z) gunzip $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;;
+ *.bz2) bunzip2 $f; b=`echo $f | sed -e 's/\.bz2$//'`;;
+ *.xz|*.lzma) unxz $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;;
*) b=$f;;
esac
@@ -48,9 +48,9 @@ do
for f in `find $d -type l`
do
- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'`
+ l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`
rm -f $f
- b=`echo $f | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'`
+ b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'`
ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT
done
done