From 91d3d1d98d95f971e5efde065e8a336e6d50c78a Mon Sep 17 00:00:00 2001 From: fabian Date: Thu, 18 Jan 2024 15:51:40 +0100 Subject: [PATCH] new script for easy archiving and compression and reversal of both --- scripts/archive_and_compress.sh | 3 +++ scripts/decompress_and_unarchive.sh | 4 ++++ 2 files changed, 7 insertions(+) create mode 100755 scripts/archive_and_compress.sh create mode 100755 scripts/decompress_and_unarchive.sh diff --git a/scripts/archive_and_compress.sh b/scripts/archive_and_compress.sh new file mode 100755 index 0000000..1386094 --- /dev/null +++ b/scripts/archive_and_compress.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +source=${1%/}; # cut off trailing "/" +tar cfv $source.tar $source && xz $source.tar; diff --git a/scripts/decompress_and_unarchive.sh b/scripts/decompress_and_unarchive.sh new file mode 100755 index 0000000..b0f34c2 --- /dev/null +++ b/scripts/decompress_and_unarchive.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +source=$1; +archive=${source%.xz}; # cut off trailing ".xz" +unxz $source && tar xfv $archive