Skip to content

Commit

Permalink
Use uname -s instead of OSTYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Mar 2, 2024
1 parent 2cecaba commit 380af0a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ archive="${archive/\$target/${target}}"
archive="${archive/\$tag/${tag}}"

tar="tar"
case "${OSTYPE}" in
linux*)
case "$(uname -s)" in
Linux)
platform="unix"
;;
darwin*)
Darwin)
platform="unix"
# Work around https://github.com/actions/cache/issues/403 by using GNU tar
# instead of BSD tar.
Expand All @@ -206,11 +206,11 @@ case "${OSTYPE}" in
brew install gnu-tar &>/dev/null
fi
;;
cygwin* | msys*)
MINGW* | MSYS* | CYGWIN* | Windows_NT)
platform="windows"
exe=".exe"
;;
*) bail "unrecognized OSTYPE '${OSTYPE}'" ;;
*) bail "unrecognized OS type '$(uname -s)'" ;;
esac

input_profile=${INPUT_PROFILE:-release}
Expand Down Expand Up @@ -344,8 +344,8 @@ case "${INPUT_TARGET:-}" in
;;
esac

case "${OSTYPE}" in
darwin*)
case "$(uname -s)" in
Darwin)
if type -P codesign &>/dev/null; then
do_codesign "${target_dir}"
fi
Expand Down

0 comments on commit 380af0a

Please sign in to comment.