$owner = "YoraiLevi"
$repo = "ahk-autohotkeys"
$baseboard_product = Get-CimInstance -Class Win32_BaseBoard | Select -ExpandProperty Product
$path = Join-Path $ENV:UserProfile "bin"; mkdir -p $path -ErrorAction SilentlyContinue
$request = @{Headers = @{"Accept"="application/json"}; Uri = "https://api.github.com/repos/$OWNER/$REPO/releases?per_page=1"}
# Get assets
$json = Invoke-WebRequest @request | Select -ExpandProperty Content | ConvertFrom-Json
$assets = $json.assets | %{ @{Uri=$_.browser_download_url; Outfile=(Join-Path $path $_.Name)}}
# Download
Stop-Process -Name "*_ahk"
$assets | % { Write-Information "Downloading $($_.Name) to $($_.Outfile)"; Invoke-WebRequest @_ }
$assets.OutFile | % { if( ($_ -match $baseboard_product) -or ($_ -match "_all_") ) {Start-Process $_} }
-
Notifications
You must be signed in to change notification settings - Fork 0
YoraiLevi/ahk-autohotkeys
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published