Merge pull request #17 from qwjyh/qwjyh/issue3

use $PSScriptRoot (other)
This commit is contained in:
qwjyh 2023-03-16 22:30:33 +09:00 committed by GitHub
commit 1da9dd34ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 13 deletions

View file

@ -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"

View file

@ -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