From 256d81eb13cfac65d8715f2d0f53637afcd8e6f5 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 15 Oct 2018 23:59:21 +0800 Subject: [PATCH] Fix OS detection Name is "Debian GNU/Linux" and not "Debian". Wildcard match to make it more robust, same for Ubuntu. --- ghcup | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ghcup b/ghcup index 94a47f7..c80ffe2 100755 --- a/ghcup +++ b/ghcup @@ -494,25 +494,25 @@ get_download_url() { # TODO: awkward, restructure case "${mydistro},${mydistrover},${myarch},${myghcver}" in - Debian,7,i386,8.2.2) + Debian*,7,i386,8.2.2) printf "%s" "${GHC_DOWNLOAD_BASEURL}/${myghcver}/ghc-${myghcver}-${myarch}-deb${mydistrover}-linux.tar.xz" ;; *,*,i386,*) printf "%s" "${GHC_DOWNLOAD_BASEURL}/${myghcver}/ghc-${myghcver}-${myarch}-deb8-linux.tar.xz" ;; - Debian,*,*,8.2.2) + Debian*,*,*,8.2.2) printf "%s" "${GHC_DOWNLOAD_BASEURL}/${myghcver}/ghc-${myghcver}-${myarch}-deb8-linux.tar.xz" ;; - Debian,8,*,*) + Debian*,8,*,*) printf "%s" "${GHC_DOWNLOAD_BASEURL}/${myghcver}/ghc-${myghcver}-${myarch}-deb8-linux.tar.xz" ;; - Debian,*,*,*) + Debian*,*,*,*) printf "%s" "${GHC_DOWNLOAD_BASEURL}/${myghcver}/ghc-${myghcver}-${myarch}-deb9-linux.tar.xz" ;; - Ubuntu,*,*,8.2.2) + Ubuntu*,*,*,8.2.2) printf "%s" "${GHC_DOWNLOAD_BASEURL}/${myghcver}/ghc-${myghcver}-${myarch}-deb8-linux.tar.xz" ;; - Ubuntu,*,*,*) + Ubuntu*,*,*,*) printf "%s" "${GHC_DOWNLOAD_BASEURL}/${myghcver}/ghc-${myghcver}-${myarch}-deb9-linux.tar.xz" ;; *,*,*,8.2.2)