From 338ea68b08408c79afca40935fe7ff508f48e4f5 Mon Sep 17 00:00:00 2001 From: Grommish Date: Sat, 9 Apr 2022 00:49:08 -0400 Subject: [PATCH] BitBetter: update build.sh / update-bitwarden.sh (#135) * BitBetter: update build.sh / update-bitwarden.sh Bitwarden has changed the way they report version numbers for self-hosted installations. Fixes https://github.com/jakeswenson/BitBetter/issues/134 Credit to @Ayitaka for the fix Tested and Verified, Updated install to 1.47.1 Signed-off-by: Donald Hoskins * Update build.sh Remove extraneous comment --- build.sh | 2 +- update-bitwarden.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 823e77f..2eeee34 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ DIR=`dirname "$0"` DIR=`exec 2>/dev/null;(cd -- "$DIR") && cd -- "$DIR"|| cd "$DIR"; unset PWD; /usr/bin/pwd || /bin/pwd || pwd` -BW_VERSION="$(curl --silent https://raw.githubusercontent.com/bitwarden/self-host/master/bitwarden.sh | grep 'COREVERSION="' | sed 's/^[^"]*"//; s/".*//')" +BW_VERSION=$(curl -sL https://go.btwrdn.co/bw-sh-versions | grep '^ *"'coreVersion'":' | awk -F\: '{ print $2 }' | sed -e 's/,$//' -e 's/^"//' -e 's/"$//') echo "Building BitBetter for BitWarden version $BW_VERSION" diff --git a/update-bitwarden.sh b/update-bitwarden.sh index e4bc938..069f983 100755 --- a/update-bitwarden.sh +++ b/update-bitwarden.sh @@ -9,7 +9,7 @@ ask () { } SCRIPT_BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -BW_VERSION="$(curl --silent https://raw.githubusercontent.com/bitwarden/self-host/master/bitwarden.sh | grep 'COREVERSION="' | sed 's/^[^"]*"//; s/".*//')" +BW_VERSION=$(curl -sL https://go.btwrdn.co/bw-sh-versions | grep '^ *"'coreVersion'":' | awk -F\: '{ print $2 }' | sed -e 's/,$//' -e 's/^"//' -e 's/"$//') echo "Starting Bitwarden update, newest server version: $BW_VERSION"