Add bun/install_bun.sh
This commit is contained in:
parent
d5cc785123
commit
b588357836
1 changed files with 15 additions and 0 deletions
15
bun/install_bun.sh
Normal file
15
bun/install_bun.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/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}
|
Reference in a new issue