mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 15:20:11 +00:00
[macOS] Simpify ghcup code to use "ghcup whereis basedir" (#4127)
This commit is contained in:
@@ -16,9 +16,7 @@ for majorMinorVersion in $minorMajorVersions; do
|
|||||||
ghcup set $fullVersion
|
ghcup set $fullVersion
|
||||||
|
|
||||||
# remove docs and profiling libs
|
# remove docs and profiling libs
|
||||||
ghc_bin_dir="$(ghcup whereis --directory ghc $fullVersion)"
|
ghc_dir="$(ghcup whereis basedir)/ghc/$fullVersion"
|
||||||
[ -e "${ghc_bin_dir}" ] || exit 1
|
|
||||||
ghc_dir="$( cd "$( dirname "${ghc_bin_dir}" )" > /dev/null 2>&1 && pwd )"
|
|
||||||
[ -e "${ghc_dir}" ] || exit 1
|
[ -e "${ghc_dir}" ] || exit 1
|
||||||
find "${ghc_dir}" \( -name "*_p.a" -o -name "*.p_hi" \) -type f -delete
|
find "${ghc_dir}" \( -name "*_p.a" -o -name "*.p_hi" \) -type f -delete
|
||||||
rm -r "${ghc_dir}"/share/*
|
rm -r "${ghc_dir}"/share/*
|
||||||
|
|||||||
Reference in New Issue
Block a user