Skip to content

Commit

Permalink
download-nasm: skip if nasm already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Feb 16, 2024
1 parent 7166018 commit 3faa1af
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions MagPython/download-nasm.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Download and unpack netwide assembler.
$ErrorActionPreference = "Stop"
$Version = "2.16.01"
if (Test-Path nasm.zip) { del -force nasm.zip }
Invoke-WebRequest -OutFile nasm.zip -Uri "https://www.nasm.us/pub/nasm/releasebuilds/$Version/win32/nasm-$Version-win32.zip"
if (Test-Path nasm-$Version) { del -recurse -force nasm-$Version }
Expand-Archive -Path nasm.zip -DestinationPath .
ren nasm-$Version nasm
if (!(Test-Path nasm)) {
if (Test-Path nasm.zip) { del -force nasm.zip }
Invoke-WebRequest -OutFile nasm.zip -Uri "https://www.nasm.us/pub/nasm/releasebuilds/$Version/win32/nasm-$Version-win32.zip"
if (Test-Path nasm-$Version) { del -recurse -force nasm-$Version }
Expand-Archive -Path nasm.zip -DestinationPath .
ren nasm-$Version nasm
}

0 comments on commit 3faa1af

Please sign in to comment.