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
|
||||
|
||||
|
||||
# check working directory
|
||||
if (!(
|
||||
(Test-Path bin) -and (Test-Path dotfiles)
|
||||
)) {
|
||||
Write-Warning -Message "wrong current path
|
||||
please execute at repo root"
|
||||
exit 1
|
||||
}
|
||||
# change working directory to git root
|
||||
Set-Location (Join-Path $PSScriptRoot "..")
|
||||
|
||||
# set Ahk2Exe.exe path
|
||||
# example "C:\Program Files\AutoHotKey\Compiler\Ahk2Exe.exe"
|
||||
|
|
|
@ -6,11 +6,8 @@ if(!(Get-Command scoop -ErrorAction SilentlyContinue)) {
|
|||
exit 1
|
||||
}
|
||||
|
||||
# execution location
|
||||
if(!((Test-Path bin) -and (Test-Path dotfiles))) {
|
||||
Write-Warning "This script need to be executed in dotfiles root"
|
||||
exit 2
|
||||
}
|
||||
# change working directory to git root
|
||||
Set-Location (Join-Path $PSScriptRoot "..")
|
||||
|
||||
|
||||
# export to JSON
|
||||
|
|
Loading…
Reference in a new issue