Skip to content
Snippets Groups Projects
Commit b369c6e6 authored by Ben Gamari's avatar Ben Gamari
Browse files

gitlab-ci: Use gtar on FreeBSD

(cherry picked from commit 9ff26b5a)
parent 610d4c3a
No related branches found
No related tags found
No related merge requests found
......@@ -217,7 +217,7 @@ function fetch_ghc() {
url="https://downloads.haskell.org/~ghc/${GHC_VERSION}/ghc-${GHC_VERSION}-${boot_triple}.tar.xz"
info "Fetching GHC binary distribution from $url..."
curl "$url" > ghc.tar.xz || fail "failed to fetch GHC binary distribution"
tar -xJf ghc.tar.xz || fail "failed to extract GHC binary distribution"
$TAR -xJf ghc.tar.xz || fail "failed to extract GHC binary distribution"
case "$(uname)" in
MSYS_*|MINGW*)
cp -r "ghc-${GHC_VERSION}"/* "$toolchain"
......@@ -268,7 +268,7 @@ function fetch_cabal() {
esac
echo "Fetching cabal-install from $cabal_url"
curl "$cabal_url" > cabal.tar.xz
tar -xJf cabal.tar.xz
$TAR -xJf cabal.tar.xz
mv cabal "$toolchain/bin"
;;
esac
......@@ -469,12 +469,14 @@ esac
# Platform-specific environment initialization
MAKE="make"
TAR="tar"
case "$(uname)" in
MSYS_*|MINGW*) mingw_init ;;
Darwin) boot_triple="x86_64-apple-darwin" ;;
FreeBSD)
boot_triple="x86_64-portbld-freebsd"
MAKE="gmake"
TAR="gtar"
;;
Linux) ;;
*) fail "uname $(uname) is not supported" ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment