Commit 46d7a6d7 by Jay Adkisson

use `wget` if it's available and curl isn't

parent cacc406e
......@@ -89,12 +89,20 @@ make_package() {
popd >&4
}
if type curl &>/dev/null; then
get() { curl "$@" ;}
elif type wget &>/dev/null; then
get() { wget -O- "$@" ;}
else
get() { echo "curl or wget is required" >&2; exit 1 ;}
fi
fetch_tarball() {
local package_name="$1"
local package_url="$2"
echo "Downloading ${package_url}..." >&2
{ curl "$package_url" > "${package_name}.tar.gz"
{ get "$package_url" > "${package_name}.tar.gz"
tar xzvf "${package_name}.tar.gz"
} >&4 2>&1
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment