diff options
author | Diego Pettenò <flameeyes@gentoo.org> | 2008-05-31 16:42:17 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-05-31 17:09:31 -0400 |
commit | 2b35b3633e3be80126306bb1b9b844b599966c95 (patch) | |
tree | bae6a567d7257cf8ef42da50fcbbfdf4019856df | |
parent | rpm2targz: use more portable code (diff) | |
download | rpm2targz-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-x | rpm2targz | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |