summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-02-23 20:44:28 +0100
committerMichał Górny <mgorny@gentoo.org>2017-03-08 08:35:37 +0100
commit2815d61ee148bc442b450c017a9c9e7ad0a34c19 (patch)
tree6f30db5cd7e89307a4fa192639e023bd0c359d92
parenttoolchain-funcs.eclass: Remove meaningless eval (diff)
downloadgentoo-2815d61ee148bc442b450c017a9c9e7ad0a34c19.tar.gz
gentoo-2815d61ee148bc442b450c017a9c9e7ad0a34c19.tar.bz2
gentoo-2815d61ee148bc442b450c017a9c9e7ad0a34c19.zip
unpacker.eclass: Replace unnecessary eval with array
Replace the eval used to attempt to construct whitespace-path-safe utility calls with much simpler bash arrays.
-rw-r--r--eclass/unpacker.eclass18
1 files changed, 9 insertions, 9 deletions
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index 8c55cc5319b..6e996120646 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: unpacker.eclass
@@ -218,30 +218,30 @@ unpack_makeself() {
debug-print "Detected Makeself version ${ver} ... using ${skip} as offset"
fi
case ${exe} in
- tail) exe="tail -n +${skip} '${src}'";;
- dd) exe="dd ibs=${skip} skip=1 if='${src}'";;
+ tail) exe=( tail -n +${skip} "${src}" );;
+ dd) exe=( dd ibs=${skip} skip=1 if="${src}" );;
*) die "makeself cant handle exe '${exe}'"
esac
# lets grab the first few bytes of the file to figure out what kind of archive it is
local filetype tmpfile="${T}/${FUNCNAME}"
- eval ${exe} 2>/dev/null | head -c 512 > "${tmpfile}"
+ "${exe[@]}" 2>/dev/null | head -c 512 > "${tmpfile}"
filetype=$(file -b "${tmpfile}") || die
case ${filetype} in
*tar\ archive*)
- eval ${exe} | tar --no-same-owner -xf -
+ "${exe[@]}" | tar --no-same-owner -xf -
;;
bzip2*)
- eval ${exe} | bzip2 -dc | tar --no-same-owner -xf -
+ "${exe[@]}" | bzip2 -dc | tar --no-same-owner -xf -
;;
gzip*)
- eval ${exe} | tar --no-same-owner -xzf -
+ "${exe[@]}" | tar --no-same-owner -xzf -
;;
compress*)
- eval ${exe} | gunzip | tar --no-same-owner -xf -
+ "${exe[@]}" | gunzip | tar --no-same-owner -xf -
;;
XZ*)
- eval ${exe} | unxz | tar --no-same-owner -xf -
+ "${exe[@]}" | unxz | tar --no-same-owner -xf -
;;
*)
eerror "Unknown filetype \"${filetype}\" ?"