From bea2d655237ba549942e6ca6da49aad994066e2d Mon Sep 17 00:00:00 2001 From: Antoine Barthelemy Date: Wed, 23 Oct 2024 15:08:10 +0200 Subject: [PATCH] feat(sh) --- scripts/dive.sh | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 scripts/dive.sh diff --git a/scripts/dive.sh b/scripts/dive.sh deleted file mode 100644 index 9450743..0000000 --- a/scripts/dive.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -o errexit -VERSION=$(curl -s "https://api.github.com/repos/wagoodman/dive/releases/latest" | jq -r '.tag_name' | sed 's/^v//') -ARCH="$(uname -m)" -OS="$(uname -s | tr '[:upper:]' '[:lower:]')" -case "$ARCH" in - "x86_64") - ARCH="amd64" - ;; - "aarch64") - ARCH="arm64" - ;; - *) - echo "Unsupported architecture: $ARCH" - exit 1 - ;; -esac -TARGET="dive_${VERSION}_${OS}_${ARCH}.tar.gz" -TMP="/tmp/dive" -mkdir -p "$TMP" -curl -sL "https://github.com/wagoodman/dive/releases/download/v${VERSION}/${TARGET}" > "${TMP}/${TARGET}" -tar -zxvf "${TMP}/${TARGET}" -C "$TMP" > /dev/null 2>&1 -sudo mv "$TMP/dive" /usr/local/bin/ -rm -rf "$TMP"