blob: ec206a5e421b99245d28cde57d385f1a55421108 [file] [log] [blame]
Tim Edwardsdebc0a42020-12-28 22:11:40 -05001#!/bin/sh
2#
3# Neither curl or wget are guaranteed to be included in all *nix systems,
4# (but most have *one* of them). This tools tries its best to find one.
5#
6
7DL_CMD=
8if type "wget" > /dev/null; then
9 DL_CMD="wget -qO"
10fi
11
12if type "curl" > /dev/null; then
13 DL_CMD="curl -sLo"
14fi
15
16if [ "$DL_CMD" = "" ]; then
17 echo "Either curl or wget are required to automatically install tools."
18 exit 1
19fi
20
21echo "Downloading $1 to $2..."
22$DL_CMD $2 $1