2021-07-13 13:17:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -xue
|
|
|
|
|
|
|
|
rm -f cabal.*.project
|
|
|
|
rm -f cabal.*.project.freeze
|
|
|
|
|
|
|
|
for ghc_ver in "$@" ; do
|
|
|
|
# shellcheck disable=SC3060
|
|
|
|
project_file=cabal.ghc${ghc_ver//./}.project
|
|
|
|
|
|
|
|
cp cabal.project "${project_file}"
|
|
|
|
case "$(uname -s)" in
|
|
|
|
MSYS*|MINGW*)
|
2024-03-16 09:32:38 +00:00
|
|
|
cabal freeze --project-file="${project_file}" -w "ghc-${ghc_ver}" -ftui
|
2021-07-13 13:17:12 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
cabal freeze --project-file="${project_file}" -w "ghc-${ghc_ver}" -ftui -finternal-downloader
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
echo "" >> "${project_file}"
|
|
|
|
echo "with-compiler: ghc-${ghc_ver}" >> "${project_file}"
|
|
|
|
|
|
|
|
sed -i -e '/ghcup/d' "${project_file}".freeze
|
|
|
|
done
|
2024-03-16 09:32:38 +00:00
|
|
|
|