1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

Properly download bitwarden.sh (#720)

This commit is contained in:
Mart124 2020-05-04 21:44:38 +02:00 committed by GitHub
parent 330ff7cd80
commit e6526ab596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,8 +43,13 @@ WEBVERSION="2.13.2"
# Functions
function downloadSelf() {
curl -s -o $SCRIPT_PATH $GITHUB_BASE_URL/scripts/bitwarden.sh
chmod u+x $SCRIPT_PATH
if curl -s -w "http_code %{http_code}" -o $SCRIPT_PATH.1 $GITHUB_BASE_URL/scripts/bitwarden.sh | grep -q "^http_code 20[0-9]"
then
mv $SCRIPT_PATH.1 $SCRIPT_PATH
chmod u+x $SCRIPT_PATH
else
rm -f $SCRIPT_PATH.1
fi
}
function downloadRunFile() {