diff options
author | Chen Cohen <hencohen90@gmail.com> | 2013-05-08 20:39:55 +0300 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2013-05-08 20:26:37 +0200 |
commit | a43f474816f86e73f63e3c8e949454d38b2b932a (patch) | |
tree | 6cb7de7c3805352e87aae3b9fbc29df99514199b /.functions | |
parent | c54639180168cca42a0546b1512ca08ea1bd1491 (diff) | |
download | dotfiles-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-- | .functions | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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=$( |