use $PSScriptRoot (other)
This commit is contained in:
parent
043ea58fbd
commit
c1a708a088
2 changed files with 4 additions and 13 deletions
|
@ -2,14 +2,8 @@
|
||||||
# Be sure to install AutoHotKey first
|
# Be sure to install AutoHotKey first
|
||||||
|
|
||||||
|
|
||||||
# check working directory
|
# change working directory to git root
|
||||||
if (!(
|
Set-Location (Join-Path $PSScriptRoot "..")
|
||||||
(Test-Path bin) -and (Test-Path dotfiles)
|
|
||||||
)) {
|
|
||||||
Write-Warning -Message "wrong current path
|
|
||||||
please execute at repo root"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# set Ahk2Exe.exe path
|
# set Ahk2Exe.exe path
|
||||||
# example "C:\Program Files\AutoHotKey\Compiler\Ahk2Exe.exe"
|
# example "C:\Program Files\AutoHotKey\Compiler\Ahk2Exe.exe"
|
||||||
|
|
|
@ -6,11 +6,8 @@ if(!(Get-Command scoop -ErrorAction SilentlyContinue)) {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# execution location
|
# change working directory to git root
|
||||||
if(!((Test-Path bin) -and (Test-Path dotfiles))) {
|
Set-Location (Join-Path $PSScriptRoot "..")
|
||||||
Write-Warning "This script need to be executed in dotfiles root"
|
|
||||||
exit 2
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# export to JSON
|
# export to JSON
|
||||||
|
|
Loading…
Reference in a new issue