Don't use aliases inside a function, bash doesn't like it

This commit is contained in:
Timothy Redaelli 2015-06-30 01:50:13 +02:00
parent 6f43d4c31e
commit b461fdecc3

View file

@ -20,10 +20,10 @@
set -e
# Gathering informations about actual environment.
if which wget >/dev/null 2>&1; then
alias _download='wget -O-'
elif which curl >/dev/null 2>&1; then
alias _download='curl -fL'
if command -v wget >/dev/null 2>&1; then
_download() { wget -O- "$@" ; }
elif command -v curl >/dev/null 2>&1; then
_download() { curl -fL "$@" ; }
else
echo "This script needs curl or wget" >&2
exit 2