Powershell variant of bootstrap script

This commit is contained in:
Michael Pfaff 2022-06-09 14:05:55 -04:00
parent 4820e0ef92
commit 6369fddd1a
Signed by: michael
GPG Key ID: CF402C4A012AA9D4
1 changed files with 20 additions and 0 deletions

20
bootstrap.ps2 Normal file
View File

@ -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