Skip to content

Commit

Permalink
- removed version test
Browse files Browse the repository at this point in the history
  • Loading branch information
sant123 committed Feb 8, 2024
1 parent 3ef6f83 commit cc4d9c3
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,21 @@ if ! command -v unzip >/dev/null; then
exit 1
fi

function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }

if [ $# -gt 0 ]; then
deno_version=$1
fi

if [ "$OS" = "Windows_NT" ]; then
target="x86_64-pc-windows-msvc"
else
case $(uname -sm) in
"Darwin x86_64") target="x86_64-apple-darwin" ;;
"Darwin arm64") target="aarch64-apple-darwin" ;;
"Linux aarch64")
if [ -n "$deno_version" ] && [ $(version "${deno_version:1}") -lt $(version "1.40.3") ]; then
echo "Error: Official Deno builds for Linux aarch64 are available from v1.40.3. (see: https://github.com/denoland/deno/issues/1846 )" 1>&2
exit 1
else
target="aarch64-unknown-linux-gnu"
fi ;;
"Linux aarch64") target="aarch64-unknown-linux-gnu" ;;
*) target="x86_64-unknown-linux-gnu" ;;
esac
fi

if [ -z "$deno_version" ]; then
if [ $# -eq 0 ]; then
deno_uri="https://github.com/denoland/deno/releases/latest/download/deno-${target}.zip"
else
deno_uri="https://github.com/denoland/deno/releases/download/${deno_version}/deno-${target}.zip"
deno_uri="https://github.com/denoland/deno/releases/download/${1}/deno-${target}.zip"
fi

deno_install="${DENO_INSTALL:-$HOME/.deno}"
Expand Down

0 comments on commit cc4d9c3

Please sign in to comment.