From 86ffcf81d9827473dcc50113f526025b83c4b742 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 28 Oct 2018 17:00:54 +0800 Subject: [PATCH] Allow to use wget instead of curl, fixes #15 --- ghcup | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ghcup b/ghcup index 731043e..3321ce7 100755 --- a/ghcup +++ b/ghcup @@ -131,6 +131,7 @@ FLAGS: -v, --verbose Enable verbose output -h, --help Prints help information -V, --version Prints version information + -w, --wget Use wget instead of curl SUBCOMMANDS: install Install GHC @@ -1134,7 +1135,16 @@ while [ $# -gt 0 ] ; do exit 0;; -h|--help) usage;; - *) case $1 in + -w|--wget) + DOWNLOADER="wget" + DOWNLOADER_OPTS="" + shift 1 + if [ $# -lt 1 ] ; then + usage + fi + ;; + *) # TODO: here comes command availability checking + case $1 in install) shift 1 while [ $# -gt 0 ] ; do