From 8fbd143b0115d1753b8cd42fb0648944b11b3c64 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Sun, 8 Oct 2017 16:38:38 -0400 Subject: [PATCH] set defaults for bz2 and gz compression utils Fix #220 --- modules/archive/functions/archive | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/archive/functions/archive b/modules/archive/functions/archive index 47f179f..7f76113 100644 --- a/modules/archive/functions/archive +++ b/modules/archive/functions/archive @@ -27,8 +27,8 @@ fi # near-liner decrease in compression time based on on the number of available cores. case "${archive_name}" in - (*.tar.gz|*.tgz) tar -cvf "${archive_name}" --use-compress-program="${_gzip_bin}" "${dir_to_archive}" ;; - (*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program="${_bzip2_bin}" "${dir_to_archive}" ;; + (*.tar.gz|*.tgz) tar -cvf "${archive_name}" --use-compress-program="${_gzip_bin:-gzip}" "${dir_to_archive}" ;; + (*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program="${_bzip2_bin:-bzip2}" "${dir_to_archive}" ;; (*.tar.xz|*.txz) tar --xz --help &> /dev/null && tar -cvJf "${archive_name}" "${dir_to_archive}" ;; (*.tar.lzma|*.tlz) tar --lzma --help &> /dev/null && tar -cvf "${archive_name}" --lzma "${dir_to_archive}" ;; (*.tar) tar -cvf "${archive_name}" "${dir_to_archive}" ;;