[Git][ghc/ghc][wip/freebsd] gitlab-ci: Allow use of newer cabal-install bindists
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Mon Nov 18 18:37:32 UTC 2024
Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC
Commits:
6f551e05 by Ben Gamari at 2024-11-18T13:33:36-05:00
gitlab-ci: Allow use of newer cabal-install bindists
Newer cabal-install bindists have internal directory structure.
Here we detect and account for the presence of such structure.
- - - - -
1 changed file:
- .gitlab/ci.sh
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -330,8 +330,14 @@ function fetch_cabal() {
esac
echo "Fetching cabal-install from $cabal_url"
curl "$cabal_url" > cabal.tar.xz
+ tmp="$(tar -tJf cabal.tar.xz | head -n1)"
$TAR -xJf cabal.tar.xz
- mv cabal "$toolchain/bin"
+ # Check if the bindist has directory structure
+ if [[ "$tmp" = "cabal" ]]; then
+ mv cabal "$toolchain/bin"
+ else
+ mv "$tmp/cabal" "$toolchain/bin"
+ fi
;;
esac
end_section "fetch cabal"
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6f551e05f194923a5bfac0fd1aa01af5b5ebda02
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6f551e05f194923a5bfac0fd1aa01af5b5ebda02
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241118/1f8f4562/attachment-0001.html>
More information about the ghc-commits
mailing list