Last active
February 9, 2016 13:52
-
-
Save criztovyl/f579096ddba239522fba to your computer and use it in GitHub Desktop.
Downloads, extracts and removes a archive file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2016 Christoph "criztovyl" Schulz | |
# No Copyright, too trivial. | |
dlextract() { | |
file=$1 | |
command=$2 | |
keep=$3 | |
wget $file && $command `basename $_` && [ "$keep" ] || rm -f $_ | |
} | |
dlunzip(){ dlextract "$1" "7z x" $2; } | |
dluntar(){ dlextract "$1" "tar -xaf" $2; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment