Don't use aliases inside a function, bash doesn't like it
This commit is contained in:
parent
6f43d4c31e
commit
b461fdecc3
1 changed files with 4 additions and 4 deletions
8
vps2arch
8
vps2arch
|
@ -20,10 +20,10 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Gathering informations about actual environment.
|
# Gathering informations about actual environment.
|
||||||
if which wget >/dev/null 2>&1; then
|
if command -v wget >/dev/null 2>&1; then
|
||||||
alias _download='wget -O-'
|
_download() { wget -O- "$@" ; }
|
||||||
elif which curl >/dev/null 2>&1; then
|
elif command -v curl >/dev/null 2>&1; then
|
||||||
alias _download='curl -fL'
|
_download() { curl -fL "$@" ; }
|
||||||
else
|
else
|
||||||
echo "This script needs curl or wget" >&2
|
echo "This script needs curl or wget" >&2
|
||||||
exit 2
|
exit 2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue