Improve stripping logic

This commit is contained in:
Julian Ospald 2022-12-21 13:44:31 +08:00
parent cb0d8b80c3
commit a5f2067d76
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
1 changed files with 9 additions and 7 deletions

View File

@ -167,13 +167,15 @@ install_ghcup() {
strip_binary() {
(
set -e
binary=$1
if [ "${RUNNER_OS}" = "macOS" ] ; then
strip "${binary}"
else
if [ "${RUNNER_OS}" != "Windows" ] ; then
local binary=$1
case "$(uname -s)" in
"Darwin"|"darwin")
;;
MSYS_*|MINGW*)
;;
*)
strip -s "${binary}"
fi
fi
;;
esac
)
}