1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-07 05:58:13 -05:00

update self path

This commit is contained in:
Kyle Spearrin 2017-08-23 16:22:02 -04:00
parent a34e19206c
commit 9af19bfcb8
2 changed files with 6 additions and 5 deletions

View File

@ -29,7 +29,7 @@ https://bitwarden.com, https://github.com/bitwarden
# Setup # Setup
$scriptName = $MyInvocation.MyCommand.Name $scriptPath = $MyInvocation.MyCommand.Path
$dir = Split-Path -Parent $MyInvocation.MyCommand.Path $dir = Split-Path -Parent $MyInvocation.MyCommand.Path
if($output -eq "") { if($output -eq "") {
$output="${dir}\bitwarden" $output="${dir}\bitwarden"
@ -50,7 +50,7 @@ if(!(Test-Path -Path $scriptsDir)) {
# Functions # Functions
function Download-Self { function Download-Self {
Invoke-RestMethod -OutFile $scriptsDir\$scriptName -Uri "${githubBaseUrl}/scripts/bitwarden.ps1" Invoke-RestMethod -OutFile $scriptPath -Uri "${githubBaseUrl}/scripts/bitwarden.ps1"
} }
function Download-Install { function Download-Install {

View File

@ -21,8 +21,9 @@ EOF
# Setup # Setup
SCRIPT_NAME=`basename "$0"`
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPT_NAME=`basename "$0"`
SCRIPT_PATH="$DIR/$SCRIPT_NAME"
OUTPUT="$DIR/bitwarden" OUTPUT="$DIR/bitwarden"
if [ $# -eq 2 ] if [ $# -eq 2 ]
then then
@ -52,8 +53,8 @@ fi
# Functions # Functions
function downloadSelf() { function downloadSelf() {
curl -s -o $SCRIPTS_DIR/$SCRIPT_NAME $GITHUB_BASE_URL/scripts/bitwarden.sh curl -s -o $SCRIPT_PATH $GITHUB_BASE_URL/scripts/bitwarden.sh
chmod u+x $SCRIPTS_DIR/$SCRIPT_NAME chmod u+x $SCRIPT_PATH
} }
function downloadInstall() { function downloadInstall() {