aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
authorChen Cohen <hencohen90@gmail.com>2013-05-08 20:39:55 +0300
committerMathias Bynens <mathias@qiwi.be>2013-05-08 20:26:37 +0200
commita43f474816f86e73f63e3c8e949454d38b2b932a (patch)
tree6cb7de7c3805352e87aae3b9fbc29df99514199b /.functions
parentc54639180168cca42a0546b1512ca08ea1bd1491 (diff)
downloaddotfiles-a43f474816f86e73f63e3c8e949454d38b2b932a.tar.gz
dotfiles-a43f474816f86e73f63e3c8e949454d38b2b932a.tar.bz2
dotfiles-a43f474816f86e73f63e3c8e949454d38b2b932a.zip
.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.
Diffstat (limited to '.functions')
-rw-r--r--.functions2
1 files changed, 1 insertions, 1 deletions
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=$(