Skip to content

Commit

Permalink
BitBetter: update build.sh / update-bitwarden.sh (#135)
Browse files Browse the repository at this point in the history
* BitBetter: update build.sh / update-bitwarden.sh

Bitwarden has changed the way they report version numbers for
self-hosted installations.

Fixes #134

Credit to @Ayitaka for the fix

Tested and Verified, Updated install to 1.47.1

Signed-off-by: Donald Hoskins <grommish@gmail.com>

* Update build.sh

Remove extraneous comment
  • Loading branch information
Grommish committed Apr 9, 2022
1 parent a58baf0 commit 338ea68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion update-bitwarden.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 338ea68

Please sign in to comment.