From 2b35b3633e3be80126306bb1b9b844b599966c95 Mon Sep 17 00:00:00 2001 From: Diego Pettenò Date: Sat, 31 May 2008 16:42:17 -0400 Subject: rpm2targz: fixup bashisms that leaked in Signed-off-by: Mike Frysinger --- rpm2targz | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm2targz b/rpm2targz index 8bfb52c..fb9cb47 100755 --- a/rpm2targz +++ b/rpm2targz @@ -23,7 +23,7 @@ # debug switch to allow to bypass use of rpm2cpio provided by the rpm package USERPM2CPIO=true -[ "$TMPDIR" == "" ] && TMPDIR=/tmp +[ "$TMPDIR" = "" ] && TMPDIR=/tmp if [ ! -d "$TMPDIR" ]; then echo "TMPDIR=$TMPDIR is not a dir" > /dev/stderr exit 1 @@ -85,7 +85,7 @@ for i in $* ; do PAYLOADOFFSET=`rpmoffset < $i` #identify compression PAYLOADHEAD=`dd ibs=${PAYLOADOFFSET} skip=1 if=$i 2> /dev/null | dd bs=10 count=1 2> /dev/null` - if echo ${PAYLOADHEAD} | grep -e $'^\037\213' > /dev/null ; then + if echo ${PAYLOADHEAD} | od -c | grep '037.213' > /dev/null ; then echo "found gzip magic bytes" decomp="gzip" elif echo ${PAYLOADHEAD} | grep -e "^BZh" > /dev/null ; then -- cgit v1.2.3-65-gdbad