Skip to content
Snippets Groups Projects
Commit f127dfa1 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Make script location-agnostic

parent f000886e
No related branches found
No related tags found
No related merge requests found
# Make sure to run from the directory containing the script itself:
$BaseDir = $(Split-Path $MyInvocation.MyCommand.Path)
Push-Location $BaseDir
$LocalConfiguration = ".\ScriptsConfig.ps1" $LocalConfiguration = ".\ScriptsConfig.ps1"
if (Test-Path $LocalConfiguration) { if (Test-Path $LocalConfiguration) {
. $LocalConfiguration . $LocalConfiguration
...@@ -13,4 +17,6 @@ if (Test-Path $LogFile) { ...@@ -13,4 +17,6 @@ if (Test-Path $LogFile) {
Get-Content -Tail 20 -Wait $LogFile Get-Content -Tail 20 -Wait $LogFile
} else { } else {
Write-Host "Logfile '$LogFile' doesn't exist." Write-Host "Logfile '$LogFile' doesn't exist."
} }
\ No newline at end of file
Pop-Location
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment