Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nsaputro-shell committed Jan 3, 2024
1 parent e7b2428 commit 76334ca
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,31 @@ list_all_versions() {
}

download_release() {
local version="$1"
local filename="$2"
local platform="$(get_platform)"
local arch="$(get_arch)"
local version filename platform arch url
version="$1"
filename="$2"
platform="$(get_platform)"
arch="$(get_arch)"

local url="$GH_REPO/releases/download/v${version}/monaco-${platform}-${arch}"
url="$GH_REPO/releases/download/v${version}/monaco-${platform}-${arch}"

echo "* Downloading $TOOL_NAME release $version..."
curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
}

get_platform() {
local -r kernel="$(uname -s)"
if [[ ${OSTYPE} == "msys" || ${kernel} == "CYGWIN"* || ${kernel} == "MINGW"* ]]; then
echo windows
else
uname | tr '[:upper:]' '[:lower:]'
fi
local kernel
kernel="$(uname -s)"
if [[ ${OSTYPE} == "msys" || ${kernel} == "CYGWIN"* || ${kernel} == "MINGW"* ]]; then
echo windows
else
uname | tr '[:upper:]' '[:lower:]'
fi
}

get_arch() {
local arch
arch=$(uname -m)
local arch
arch=$(uname -m)
if [[ ${arch} == "arm64" ]] || [[ ${arch} == "aarch64" ]]; then
echo "arm64"
elif [[ ${arch} == *"arm"* ]] || [[ ${arch} == *"aarch"* ]]; then
Expand All @@ -67,7 +69,6 @@ get_arch() {
fi
}


install_version() {
local install_type="$1"
local version="$2"
Expand Down

0 comments on commit 76334ca

Please sign in to comment.