Fix OS detection

Name is "Debian GNU/Linux" and not "Debian". Wildcard match
to make it more robust, same for Ubuntu.
This commit is contained in:
Julian Ospald 2018-10-15 23:59:21 +08:00
parent c6ff875d12
commit 256d81eb13
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

12
ghcup
View File

@ -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)