From e81f8e5f37a7f20afde9e5edcdc2c43249967a01 Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Fri, 10 Jul 2015 19:29:40 +0200 Subject: [PATCH] More portable pane_capture archiving --- CHANGELOG.md | 1 + scripts/helpers.sh | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e66e64..176de4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ feature) - "save pane contents" feature saves files to a separate directory - archive and compress pane contents file +- make archive & compress pane contents process more portable ### v2.4.0, 2015-02-23 - add "tmux-test" diff --git a/scripts/helpers.sh b/scripts/helpers.sh index b1429d6..6b7ea2e 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -74,13 +74,15 @@ is_session_grouped() { # pane content file helpers pane_contents_create_archive() { - tar czf "$(pane_contents_archive_file)" -C "$(resurrect_dir)" ./pane_contents/ + tar cf - -C "$(resurrect_dir)" ./pane_contents/ | + gzip > "$(pane_contents_archive_file)" } pane_content_files_restore_from_archive() { local archive_file="$(pane_contents_archive_file)" if [ -f "$archive_file" ]; then - tar xzf "$archive_file" -C "$(resurrect_dir)" + gzip -d < "$archive_file" | + tar xf - -C "$(resurrect_dir)" fi }