2
0

Added Update Scripts via Git

This commit is contained in:
bschaper 2025-01-07 09:38:47 -06:00
parent 2974dad6ed
commit f311228d61
2 changed files with 22 additions and 0 deletions

18
Login/Update-Scripts.ps1 Normal file
View File

@ -0,0 +1,18 @@
# Change the current directory to the Scripts directory
cd "C:\Scripts"
# Add exception handling for the git pull command
git config --global --add safe.directory C:/Scripts
# Execute the git pull command
git pull
# Optional: Check the exit code of the git pull command
$LASTEXITCODE
# Optional: Display a message based on the exit code
if ($LASTEXITCODE -eq 0) {
Write-Host "git pull successful."
} else {
Write-Host "git pull failed."
}

View File

@ -9,6 +9,10 @@ set "LOGFILE=%LOGFILE: =0%"
echo Starting setup script at %DATE% %TIME% > "%LOGFILE%"
:: Update Scripts via Git
echo Updating Scripts...
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\Update-Scripts.ps1"
:: Enable Wake on LAN
echo Checking Wake on LAN...
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\Enable-WOL.ps1"