From 62f3779ba4ea77c062ec34943c1fae5242ad3e5d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 11 Jul 2019 16:05:51 +0200 Subject: [rootfs-stage31] tarcopy: Ignore directories This prevents us from messing up directory permissions from tar files that were packed on windows or otherwise screwed up. --- core/rootfs/rootfs-stage31/data/inc/functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/rootfs/rootfs-stage31/data/inc/functions b/core/rootfs/rootfs-stage31/data/inc/functions index 6edbeffb..a4ad56db 100644 --- a/core/rootfs/rootfs-stage31/data/inc/functions +++ b/core/rootfs/rootfs-stage31/data/inc/functions @@ -93,6 +93,8 @@ bench_event() { tarcopy() { [ -d "$1" -a -d "$2" ] || return 1 cd "$1" - tar -cp * | tar -xp -C "$2" + find . \! -type d > /tmp/tctmp + tar -c -p -T /tmp/tctmp | tar -xp -C "$2" + rm -f -- /tmp/tctmp cd - &>/dev/null } -- cgit v1.2.3-55-g7522