aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego PettenĂ² <flameeyes@gentoo.org>2008-05-31 16:42:17 -0400
committerMike Frysinger <vapier@gentoo.org>2008-05-31 17:09:31 -0400
commit2b35b3633e3be80126306bb1b9b844b599966c95 (patch)
treebae6a567d7257cf8ef42da50fcbbfdf4019856df
parentrpm2targz: use more portable code (diff)
downloadrpm2targz-2b35b3633e3be80126306bb1b9b844b599966c95.tar.gz
rpm2targz-2b35b3633e3be80126306bb1b9b844b599966c95.tar.bz2
rpm2targz-2b35b3633e3be80126306bb1b9b844b599966c95.zip
rpm2targz: fixup bashisms that leaked in
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-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