aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'rpm2targz')
-rwxr-xr-xrpm2targz4
1 files 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