forked from togethercomputer/MoA
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate.ps1
More file actions
23 lines (19 loc) · 679 Bytes
/
update.ps1
File metadata and controls
23 lines (19 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# MoA Chatbot - Update Script for PowerShell
# Checks for and applies updates from git repository
Write-Host "MoA Chatbot - Self-Update Utility" -ForegroundColor Cyan
Write-Host "===================================" -ForegroundColor Cyan
Write-Host ""
# Check for updates
python update.py --check
if ($LASTEXITCODE -eq 0) {
Write-Host ""
$update = Read-Host "Do you want to update now? (Y/N)"
if ($update -eq "Y" -or $update -eq "y") {
Write-Host ""
python update.py --update
}
} else {
Write-Host ""
Write-Host "Update check failed. Make sure you're in a git repository." -ForegroundColor Yellow
Read-Host "Press Enter to exit"
}