new script for easy archiving and compression and reversal of both

This commit is contained in:
fabian 2024-01-18 15:51:40 +01:00
parent d79688f50f
commit 91d3d1d98d
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
source=${1%/}; # cut off trailing "/"
tar cfv $source.tar $source && xz $source.tar;

View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
source=$1;
archive=${source%.xz}; # cut off trailing ".xz"
unxz $source && tar xfv $archive