From a43f474816f86e73f63e3c8e949454d38b2b932a Mon Sep 17 00:00:00 2001 From: Chen Cohen Date: Wed, 8 May 2013 20:39:55 +0300 Subject: .functions: Tweak `targz` Trim the trailing slash from the path argument passed to `targz`. This fixes the annoying behavior where `targz foo/` created `foo/.tar.gz` instead of `foo.tar.gz`. Ref. #202. --- .functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.functions') diff --git a/.functions b/.functions index c16972c..2481e8a 100644 --- a/.functions +++ b/.functions @@ -28,7 +28,7 @@ function cdf() { # short for `cdfinder` # Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression function targz() { - local tmpFile="${@}.tar" + local tmpFile="${@%/}.tar" tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1 size=$( -- cgit v1.2.3