From fbb1aa9100e6960a36fc626db6e7c948185c6881 Mon Sep 17 00:00:00 2001 From: Christoph Polcin Date: Thu, 12 Nov 2020 23:30:28 +0100 Subject: [PATCH] support zip as COMP / archive format --- README | 5 +++-- send-files | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README b/README index d5cbfa7..494f139 100644 --- a/README +++ b/README @@ -34,8 +34,8 @@ Usage ENV: ALGO Cipher Algo, current: AES256 - see gpg --version - COMP compression from suffix, current: tar.gz + see gpg --version + COMP compression tar.*;zip, current: tar.gz SEND sendmail compatible command, current: msmtp -t SUBF pass subfolder, current: send-files @@ -49,6 +49,7 @@ Dependencies - openssl - sendmail - tar +- zip Contribution welcome diff --git a/send-files b/send-files index 6251fc2..25345d8 100755 --- a/send-files +++ b/send-files @@ -14,7 +14,7 @@ _usage() { ENV: ALGO Cipher Algo, current: ${ALGO} see gpg --version - COMP compression from suffix, current: ${COMP} + COMP compression tar.*;zip, current: ${COMP} SEND sendmail compatible command, current: ${SEND} SUBF pass subfolder, current: ${SUBF} EOF @@ -56,6 +56,11 @@ _archive() { # comp files... c=--zstd ;; *xz) c=--xz ;; + zip) + shift + zip -r - -- "$@" + return 0 + ;; *) c=--no-auto-compress ;; -- 2.45.2