mirror of
https://github.com/bitwarden/server.git
synced 2025-04-14 17:48:12 -05:00
data dir doesnt need to exist to updateself
This commit is contained in:
parent
0e247b711d
commit
97bfa00657
@ -47,9 +47,6 @@ $githubBaseUrl = "https://raw.githubusercontent.com/bitwarden/core/master"
|
|||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
function Download-Self {
|
function Download-Self {
|
||||||
if(!(Test-Path -Path $scriptsDir)) {
|
|
||||||
New-Item -ItemType directory -Path $scriptsDir | Out-Null
|
|
||||||
}
|
|
||||||
Invoke-RestMethod -OutFile $scriptPath -Uri "${githubBaseUrl}/scripts/bitwarden.ps1"
|
Invoke-RestMethod -OutFile $scriptPath -Uri "${githubBaseUrl}/scripts/bitwarden.ps1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,7 +125,6 @@ elseif($stop) {
|
|||||||
Invoke-Expression "$scriptsDir\run.ps1 -stop -outputDir $output -dockerDir $dockerDir"
|
Invoke-Expression "$scriptsDir\run.ps1 -stop -outputDir $output -dockerDir $dockerDir"
|
||||||
}
|
}
|
||||||
elseif($updateself) {
|
elseif($updateself) {
|
||||||
Check-Output-Dir-Exists
|
|
||||||
Download-Self
|
Download-Self
|
||||||
echo "Updated self."
|
echo "Updated self."
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,6 @@ GITHUB_BASE_URL="https://raw.githubusercontent.com/bitwarden/core/master"
|
|||||||
# Functions
|
# Functions
|
||||||
|
|
||||||
function downloadSelf() {
|
function downloadSelf() {
|
||||||
if [ ! -d "$SCRIPTS_DIR" ]
|
|
||||||
then
|
|
||||||
mkdir $SCRIPTS_DIR
|
|
||||||
fi
|
|
||||||
curl -s -o $SCRIPT_PATH $GITHUB_BASE_URL/scripts/bitwarden.sh
|
curl -s -o $SCRIPT_PATH $GITHUB_BASE_URL/scripts/bitwarden.sh
|
||||||
chmod u+x $SCRIPT_PATH
|
chmod u+x $SCRIPT_PATH
|
||||||
}
|
}
|
||||||
@ -142,7 +138,6 @@ then
|
|||||||
$SCRIPTS_DIR/run.sh stop $OUTPUT $DOCKER_DIR
|
$SCRIPTS_DIR/run.sh stop $OUTPUT $DOCKER_DIR
|
||||||
elif [ "$1" == "updateself" ]
|
elif [ "$1" == "updateself" ]
|
||||||
then
|
then
|
||||||
checkOutputDirExists
|
|
||||||
downloadSelf
|
downloadSelf
|
||||||
echo "Updated self."
|
echo "Updated self."
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user