diff options
author | Simon Rettberg | 2019-07-11 16:05:51 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-07-11 16:05:51 +0200 |
commit | 62f3779ba4ea77c062ec34943c1fae5242ad3e5d (patch) | |
tree | 27575c288884bad6b371dc5ffd36a7a720983915 | |
parent | [sshd] Cleanup sshd_config (diff) | |
download | mltk-62f3779ba4ea77c062ec34943c1fae5242ad3e5d.tar.gz mltk-62f3779ba4ea77c062ec34943c1fae5242ad3e5d.tar.xz mltk-62f3779ba4ea77c062ec34943c1fae5242ad3e5d.zip |
[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.
-rw-r--r-- | core/rootfs/rootfs-stage31/data/inc/functions | 4 |
1 files changed, 3 insertions, 1 deletions
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 } |