Skip to content

Commit

Permalink
shell lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Hemi authored and Simon Hemi committed Mar 7, 2024
1 parent ec64b9a commit 0fe24ea
Showing 1 changed file with 34 additions and 24 deletions.
58 changes: 34 additions & 24 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,44 @@ list_all_versions() {
}

get_os() {
case "$OSTYPE" in
darwin*)
echo "apple-darwin" ;;
linux*)
echo "unknow-linux-gnu" ;;
msys*)
echo "pc-windows-msvc" ;;
cygwin*)
echo "pc-windows-msvc" ;;
*)
echo "OS type is not supported"
exit 1 ;;
case "$OSTYPE" in
darwin*)
echo "apple-darwin"
;;
linux*)
echo "unknow-linux-gnu"
;;
msys*)
echo "pc-windows-msvc"
;;
cygwin*)
echo "pc-windows-msvc"
;;
*)
echo "OS type is not supported"
exit 1
;;
esac
}

get_ext() {
case "$OSTYPE" in
darwin*)
echo "tar.gz" ;;
linux*)
echo "tar.gz" ;;
msys*)
echo "zip" ;;
cygwin*)
echo "zip" ;;
*)
echo "OS type is not supported"
exit 1 ;;
case "$OSTYPE" in
darwin*)
echo "tar.gz"
;;
linux*)
echo "tar.gz"
;;
msys*)
echo "zip"
;;
cygwin*)
echo "zip"
;;
*)
echo "OS type is not supported"
exit 1
;;
esac
}

Expand Down

0 comments on commit 0fe24ea

Please sign in to comment.