summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-05-01 17:36:06 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-05-01 17:36:06 +0200
commit18a22b09aeccf03eb9f7ca8ba47a3755ef5fea06 (patch)
tree40df003fa5afb06413da55c6232499f7cd02058f /scripts/lib
parent606d3e377565732c1ad369eede2cda8be07b8f8c (diff)
downloadptxdist-18a22b09aeccf03eb9f7ca8ba47a3755ef5fea06.tar.gz
ptxdist-18a22b09aeccf03eb9f7ca8ba47a3755ef5fea06.tar.xz
ptxd_install_generic: don't call 'stat' twice
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/ptxd_make_xpkg_pkg.sh7
1 files changed, 5 insertions, 2 deletions
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")