From 0d16297bf748cbb51f3cf262f4e28175b29a9dd8 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 22 Sep 2021 18:32:16 +0200 Subject: [PATCH] [Ubuntu] Simplify ghcup code (#4126) --- images/linux/scripts/installers/haskell.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index 574052dc7..702841e6d 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -30,9 +30,7 @@ for majorMinorVersion in $minorMajorVersions; do ghcup set ghc $fullVersion # remove docs and profiling libs - ghc_bin_dir="$(ghcup whereis --directory ghc $fullVersion)" - [ -e "${ghc_bin_dir}" ] || exit 1 - ghc_dir="$(realpath "${ghc_bin_dir}"/..)" + ghc_dir="$(ghcup whereis basedir)/ghc/$fullVersion" [ -e "${ghc_dir}" ] || exit 1 find "${ghc_dir}" \( -name "*_p.a" -o -name "*.p_hi" \) -type f -delete rm -r "${ghc_dir}"/share/*