diff --git a/modules/archive/functions/archive b/modules/archive/functions/archive index 06f883f..e2225b5 100644 --- a/modules/archive/functions/archive +++ b/modules/archive/functions/archive @@ -1,17 +1,17 @@ +# vim:et sts=2 sw=2 ft=zsh # # Creates archive files # if (( # < 2 )); then - print "usage: ${0} [archive_name.ext] [file]..." >&2 + print "usage: ${0} ..." >&2 return 1 fi # we are quitting (above) if there are less than 2 vars, # so we don't need any argc check here. -# strip the path, just in case one is provided for some reason -local archive_name="${1:t}" +local archive_name="${1}" shift # pigz and pbzip2 are aliased in the init.zsh file. This provides a significant speedup, resulting in a diff --git a/modules/archive/functions/unarchive b/modules/archive/functions/unarchive index e91db8f..8113234 100644 --- a/modules/archive/functions/unarchive +++ b/modules/archive/functions/unarchive @@ -1,19 +1,14 @@ +# vim:et sts=2 sw=2 ft=zsh # # Unarchives files # if (( # != 1 )); then - print "usage: ${0} [archive.ext]" >&2 + print "usage: ${0} " >&2 return 1 fi -if [[ ! -s ${1} ]]; then - print "archive \"${1}\" was not found or has size 0." >&2 - return 1 -fi - -# strip the path, just in case one is provided for some reason -local archive_name="${1:t}" +local archive_name="${1}" # using unpigz/pbunzip2 provides little to decompression time; the benefit is mainly in compression time. # setting it as an alias in the init.zsh file should be sufficient here.