|
@@ -25,8 +25,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" "${dir_to_archive}" ;;
|
|
|
- (*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program="bzip2" "${dir_to_archive}" ;;
|
|
|
+ (*.tar.gz|*.tgz) tar -cvf "${archive_name}" --use-compress-program=gzip "${dir_to_archive}" ;;
|
|
|
+ (*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program=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}" ;;
|
|
@@ -34,7 +34,7 @@ case "${archive_name}" in
|
|
|
(*.rar) rar a "${archive_name}" "${dir_to_archive}" ;;
|
|
|
(*.7z) 7za a "${archive_name}" "${dir_to_archive}" ;;
|
|
|
(*.gz) print "${0}: .gz is only useful for single files, and does not capture permissions. Use .tar.gz" ;;
|
|
|
- (*.bz2) print "${0}: .bzip2 is only useful for single files, and does not capture permissions. Use .tar.bz2" ;;
|
|
|
+ (*.bz|*.bz2) print "${0}: .bzip2 is only useful for single files, and does not capture permissions. Use .tar.bz2" ;;
|
|
|
(*.xz) print "${0}: .xz is only useful for single files, and does not capture permissions. Use .tar.xz" ;;
|
|
|
(*.lzma) print "${0}: .lzma is only useful for single files, and does not capture permissions. Use .tar.lzma" ;;
|
|
|
(*) print "${0}: unknown archive type: ${archive_name}" ;;
|