From 0fe24ea164f63402b1e23ef338c56d99f58c1553 Mon Sep 17 00:00:00 2001 From: Simon Hemi Date: Thu, 7 Mar 2024 22:18:52 +1100 Subject: [PATCH] shell lint --- lib/utils.bash | 58 +++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/lib/utils.bash b/lib/utils.bash index 2357f79..ca6ce17 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -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 }