-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
download-nasm: skip if nasm already exists
- Loading branch information
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |