mirror of
https://github.com/casjaysdevdocker/deno
synced 2025-01-18 18:34:21 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
a635557052
commit
66e3acfe1b
@ -19,9 +19,9 @@
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
__get_file() {
|
__get_file() {
|
||||||
local exitStatus=""
|
local exitStatus=""
|
||||||
if curl -q -LSf -o "$FILE" "$URL"; then
|
if curl -q -LSf "$URL" -o "$FILE"; then
|
||||||
exitStatus=0
|
exitStatus=0
|
||||||
elif curl -q -LSf -o "$FILE" "$LATEST_URL"; then
|
elif curl -q -LSf "$LATEST_URL" -o "$FILE"; then
|
||||||
URL="$LATEST_URL"
|
URL="$LATEST_URL"
|
||||||
exitStatus=0
|
exitStatus=0
|
||||||
else
|
else
|
||||||
@ -34,12 +34,15 @@ DENO_VERSION="${DENO_VERSION:-v1.26.1}"
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; then
|
if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; then
|
||||||
ARCH="x86_64"
|
ARCH="x86_64"
|
||||||
|
BIN_FILE="/usr/bin/deno"
|
||||||
FILE="/tmp/deno-$ARCH.zip"
|
FILE="/tmp/deno-$ARCH.zip"
|
||||||
|
TMP_DIR="/tmp/deno-$ARCH/deno"
|
||||||
DENO_VERSION="${DENO_VERSION:-latest}"
|
DENO_VERSION="${DENO_VERSION:-latest}"
|
||||||
URL="https://github.com/denoland/deno/releases/download/$DENO_VERSION/deno-$ARCH-unknown-linux-gnu.zip"
|
URL="https://github.com/denoland/deno/releases/download/$DENO_VERSION/deno-$ARCH-unknown-linux-gnu.zip"
|
||||||
LATEST_URL="https://github.com/denoland/deno/releases/download/latest/deno-$ARCH-unknown-linux-gnu.zip"
|
LATEST_URL="https://github.com/denoland/deno/releases/download/latest/deno-$ARCH-unknown-linux-gnu.zip"
|
||||||
elif [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
|
elif [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
|
||||||
ARCH="arm64"
|
ARCH="arm64"
|
||||||
|
BIN_FILE="/usr/bin/deno"
|
||||||
FILE="/tmp/deno-$ARCH.zip"
|
FILE="/tmp/deno-$ARCH.zip"
|
||||||
DENO_VERSION="${DENO_VERSION:-latest}"
|
DENO_VERSION="${DENO_VERSION:-latest}"
|
||||||
URL="https://github.com/LukeChannings/deno-arm64/releases/download/$DENO_VERSION/deno-linux-$ARCH.zip"
|
URL="https://github.com/LukeChannings/deno-arm64/releases/download/$DENO_VERSION/deno-linux-$ARCH.zip"
|
||||||
@ -51,13 +54,13 @@ fi
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# AMD64 binary
|
# AMD64 binary
|
||||||
if [ "$ARCH" = "x86_64" ]; then
|
if [ "$ARCH" = "x86_64" ]; then
|
||||||
echo "grabbing ${DENO_VERSION}/deno-$ARCH-unknown-linux-gnu.zip from denoland for $ARCH"
|
echo "grabbing ${DENO_VERSION} from denoland for $ARCH"
|
||||||
__get_file && if [ -f "/tmp/deno-$ARCH.zip" ]; then
|
__get_file && if [ -f "$FILE" ]; then
|
||||||
mkdir -p "/tmp/deno-$ARCH" && cd "/tmp/deno-$ARCH" || exit 10
|
mkdir -p "$TMP_DIR" && cd "$TMP_DIR" || exit 10
|
||||||
unzip "/tmp/deno-$ARCH.zip"
|
unzip "$FILE"
|
||||||
mv -fv "/tmp/deno-$ARCH/deno" "/usr/bin/deno"
|
mv -fv "$TMP_DIR" "$BIN_FILE"
|
||||||
chmod -Rf 755 "/usr/bin/deno"
|
chmod -Rf 755 "$BIN_FILE"
|
||||||
rm -Rf "/tmp/deno-$ARCH.zip" "/tmp/deno-$ARCH"
|
rm -Rf "$FILE" "$TMP_DIR"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Failed to download deno from $URL"
|
echo "Failed to download deno from $URL"
|
||||||
@ -66,13 +69,13 @@ fi
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# ARM64 binary
|
# ARM64 binary
|
||||||
if [ "$ARCH" = "arm64" ]; then
|
if [ "$ARCH" = "arm64" ]; then
|
||||||
echo "grabbing ${DENO_VERSION}/deno-$ARCH-unknown-linux-gnu.zip from denoland for $ARCH"
|
echo "grabbing ${DENO_VERSION} from LukeChannings for $ARCH"
|
||||||
__get_file && if [ -f "/tmp/deno-$ARCH.zip" ]; then
|
__get_file && if [ -f "$FILE" ]; then
|
||||||
mkdir -p "/tmp/deno-$ARCH" && cd "/tmp/deno-$ARCH" || exit 10
|
mkdir -p "$TMP_DIR" && cd "$TMP_DIR" || exit 10
|
||||||
unzip "/tmp/deno-$ARCH.zip"
|
unzip "$FILE"
|
||||||
mv -fv "/tmp/deno-$ARCH/deno" "/usr/bin/deno"
|
mv -fv "$TMP_DIR" "$BIN_FILE"
|
||||||
chmod -Rf 755 "/usr/bin/deno"
|
chmod -Rf 755 "$BIN_FILE"
|
||||||
rm -Rf "/tmp/deno-$ARCH.zip" "/tmp/deno-$ARCH"
|
rm -Rf "$FILE" "$TMP_DIR"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Failed to download deno from $URL"
|
echo "Failed to download deno from $URL"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user