You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
825 B
22 lines
825 B
|
|
$url = "https://www.gitea1.intx.com.au/jn/punkbin/raw/branch/master/win32-x86_64/tclsh902z.exe" |
|
|
|
$outbase = $PSScriptRoot |
|
$outbase = Resolve-Path -Path $outbase |
|
#expected script location is the bin folder of a punk project |
|
$rtfolder = Join-Path -Path $outbase -ChildPath "runtime" |
|
#$output = "$(join-path $PSScriptRoot "..\src\runtime\tclsh902z.exe")" |
|
$output = "$(join-path $rtfolder "win32-x86_64\tclsh902z.exe")" |
|
|
|
$container = split-path -Path $output -Parent |
|
new-item -Path $container -ItemType Directory -force #create with intermediary folders if not already present |
|
|
|
if (-not(Test-Path -Path $output -PathType Leaf)) { |
|
Write-Host "Downloading from $url ..." |
|
Invoke-WebRequest -Uri $url -OutFile $output |
|
Write-Host "Runtime saved at $output" |
|
} else { |
|
Write-Host "Runtime already found at $output" |
|
} |
|
|
|
|
|
|