File: get_pak.ps1

package info (click to toggle)
simutrans 124.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,880 kB
  • sloc: cpp: 160,224; ansic: 9,382; sh: 1,237; awk: 1,081; makefile: 932; javascript: 2
file content (9 lines) | stat: -rw-r--r-- 410 bytes parent folder | download
1
2
3
4
5
6
7
8
9
# Downloades a simple zip file and unzips it. Assumes everything is according to Simutrans norm.
Write-Output "Downloading and installing "$($args[0])
(New-Object System.Net.WebClient).DownloadFile($args[0], "temp.zip")
expand-archive -path "temp.zip" -DestinationPath "." -Force
del "temp.zip"
if (Test-Path -Path "simutrans") {
	Move-Item -Path 'simutrans\*' -Destination . -Force
	rmdir -Force "simutrans"
}