This repository has been archived on 2025-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
podman_examples/bun/install_bun.sh
2025-03-19 20:23:36 +00:00

15 lines
599 B
Bash

#!/bin/bash
set -e
SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPTDIR
RELEASE_VERSION="1.2.5"
RELEASE_VARIANT="bun-linux-x64"
ZIP_FILENAME="${RELEASE_VARIANT}.zip"
wget https://github.com/oven-sh/bun/releases/download/bun-v${RELEASE_VERSION}/${ZIP_FILENAME}
HASH_ZIPFILE=$(sha256sum ${ZIP_FILENAME} | cut -d " " -f 1 )
wget https://github.com/oven-sh/bun/releases/download/bun-v${RELEASE_VERSION}/SHASUMS256.txt
hashInFile=$(cat SHASUMS256.txt | grep -c "${HASH_ZIPFILE} ${ZIP_FILENAME}")
if [ $hashInFile -eq 0 ]; then exit 1; fi;
unzip ${ZIP_FILENAME}