mirror of
https://github.com/JanJastrow/.dotfiles.git
synced 2024-11-22 10:39:57 +01:00
Rewrite targz function
This commit is contained in:
parent
2d298d20d7
commit
a6df3fae57
@ -61,7 +61,6 @@ alias bcp='rsync -avzuh --progress --partial'
|
||||
alias random32="echo $(date +%s | md5sum | head -c 32)"
|
||||
|
||||
# tar
|
||||
alias targz='tar -czvf'
|
||||
alias untargz='tar -xzvf'
|
||||
|
||||
# (macOS) start Firefox Profile manager
|
||||
|
14
zsh/scripts
14
zsh/scripts
@ -19,6 +19,20 @@ if [[ ! -x `which sha256sum` ]]; then
|
||||
}
|
||||
fi
|
||||
|
||||
# Tar.gz with GZIP or PIGZ
|
||||
function targz() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: targz filename.tar.gz directory"
|
||||
return
|
||||
fi
|
||||
if [[ ! -x `which pigz` ]]; then
|
||||
tar -czf $1 $2
|
||||
echo "gzip"
|
||||
else
|
||||
tar -c $2 | pigz > $1
|
||||
echo "pigz"
|
||||
fi
|
||||
}
|
||||
|
||||
# pushover notification
|
||||
function pushover() {
|
||||
|
Loading…
Reference in New Issue
Block a user