Added Update Scripts via Git
This commit is contained in:
parent
2974dad6ed
commit
f311228d61
18
Login/Update-Scripts.ps1
Normal file
18
Login/Update-Scripts.ps1
Normal 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."
|
||||||
|
}
|
||||||
@ -9,6 +9,10 @@ set "LOGFILE=%LOGFILE: =0%"
|
|||||||
|
|
||||||
echo Starting setup script at %DATE% %TIME% > "%LOGFILE%"
|
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
|
:: Enable Wake on LAN
|
||||||
echo Checking Wake on LAN...
|
echo Checking Wake on LAN...
|
||||||
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\Enable-WOL.ps1"
|
powershell -ExecutionPolicy Bypass -File "C:\Scripts\Login\Enable-WOL.ps1"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user