From 18a22b09aeccf03eb9f7ca8ba47a3755ef5fea06 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Sun, 1 May 2016 17:36:06 +0200 Subject: ptxd_install_generic: don't call 'stat' twice Signed-off-by: Michael Olbrich --- scripts/lib/ptxd_make_xpkg_pkg.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh index b7a9454f0..3122d7236 100644 --- a/scripts/lib/ptxd_make_xpkg_pkg.sh +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh @@ -530,13 +530,16 @@ ptxd_install_generic() { local strip="$5" local -a stat - stat=( $(stat -c "%u %g %a 0x%t 0x%T" "${file}") ) && + local orig_IFS="${IFS}" + local IFS=":" + stat=( $(stat -c "%u:%g:%a:0x%t:0x%T:%F" "${file}") ) && + IFS="${orig_IFS}" local usr="${usr:-${stat[0]}}" && local grp="${grp:-${stat[1]}}" && local mod="${stat[2]}" && local major="${stat[3]}" && local minor="${stat[4]}" && - local type="$(stat -c "%F" "${file}")" && + local type="${stat[5]}" && case "${type}" in "directory") -- cgit v1.2.3