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:
parent
c6ff875d12
commit
256d81eb13
12
ghcup
12
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)
|
||||
|
Loading…
Reference in New Issue
Block a user