From 6369fddd1a21067e163b806bf8bec659a78423ec Mon Sep 17 00:00:00 2001 From: Michael Pfaff Date: Thu, 9 Jun 2022 14:05:55 -0400 Subject: [PATCH] Powershell variant of bootstrap script --- bootstrap.ps2 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 bootstrap.ps2 diff --git a/bootstrap.ps2 b/bootstrap.ps2 new file mode 100644 index 0000000..166011a --- /dev/null +++ b/bootstrap.ps2 @@ -0,0 +1,20 @@ +$run_path = Get-Location + +Push-Location /SWTools + +if (Get-Command "./python/python.exe" -ErrorAction SilentlyContinue) { + echo "Python already installed." +} else { + if (Get-Command "./python.zip" -ErrorAction SilentlyContinue) { + } else { + curl "https://www.python.org/ftp/python/3.10.5/python-3.10.5-embed-amd64.zip" --output ./python.zip + } + + if (Get-Command "./python" -ErrorAction SilentlyContinue) { + Remove-Item -Recurse -ErrorAction:Stop "./python" + } + + tar -xf ./python.zip +} + +./python/python.exe main.py $run_path