aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/maketar
diff options
context:
space:
mode:
authorVG <vg@devys.org>2017-05-11 10:01:40 +0200
committerVG <vg@devys.org>2017-05-11 10:01:40 +0200
commitdc8d497a298165ec954a5ff550cd97c79dde1a8a (patch)
treed53a673d2a8f4b52d806a1bf365fe6245e38b33e /scripts/maketar
parent0cbddfab73b55bdfad07991663a56c84fea026e3 (diff)
downloadscripts-dc8d497a298165ec954a5ff550cd97c79dde1a8a.tar.gz
scripts-dc8d497a298165ec954a5ff550cd97c79dde1a8a.tar.bz2
scripts-dc8d497a298165ec954a5ff550cd97c79dde1a8a.zip
add more scripts
Diffstat (limited to 'scripts/maketar')
-rwxr-xr-xscripts/maketar6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/maketar b/scripts/maketar
new file mode 100755
index 0000000..a85fc58
--- /dev/null
+++ b/scripts/maketar
@@ -0,0 +1,6 @@
+#!/bin/bash
+if [ -x "$(which pigz)" ]; then
+ exec tar cf - "${1%%/}/" | pigz > "${1%%/}.tgz"
+else
+ exec tar czf "${1%%/}.tgz" "${1%%/}/"
+fi