summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2011-09-01 18:46:02 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2011-09-01 19:29:06 +0200
commita2e010397ce7e9687edd959f02498a63b2b18468 (patch)
treeca798966284f4c7cc77c87620058665c176f6110
parent76772e58ef5b53416cdb6c7ddf5a7aa9d8090823 (diff)
downloadptxdist-a2e010397ce7e9687edd959f02498a63b2b18468.tar.gz
ptxdist-a2e010397ce7e9687edd959f02498a63b2b18468.tar.xz
ptxd_make_world_extract: make it work with older tar
Older tar versions (e.g. 1.22) cannot handle "--remove-files -c .": tar: .: Cannot rmdir: Invalid argument It tries to remove its current working directory which of course fails. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_make_world_extract.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_world_extract.sh b/scripts/lib/ptxd_make_world_extract.sh
index 46e32ccfb..0e911e731 100644
--- a/scripts/lib/ptxd_make_world_extract.sh
+++ b/scripts/lib/ptxd_make_world_extract.sh
@@ -71,7 +71,7 @@ extract: pkg_extract_dir=$(ptxd_print_path ${pkg_dir})"
fi
local depth=$[${pkg_strip_level:=1}+1]
if [ -e "${pkg_dir}" ]; then
- tar -C "${tmpdir}" --remove-files -c . | \
+ tar -C "$(dirname "${tmpdir}")" --remove-files -c "$(basename "${tmpdir}")" | \
tar -x --strip-components=${depth} -C "${pkg_dir}"
check_pipe_status
else