mirror of
https://github.com/dagucloud/dagu.git
synced 2026-12-05 05:32:51 +00:00
22 lines
655 B
Batchfile
22 lines
655 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
REM Copyright (C) 2026 Yota Hamada
|
|
REM SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
set "PS1_URL=https://raw.githubusercontent.com/dagu-org/dagu/main/scripts/installer.ps1"
|
|
set "TEMP_PS1=%TEMP%\dagu-installer-%RANDOM%.ps1"
|
|
|
|
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
|
"$ProgressPreference='SilentlyContinue'; Invoke-WebRequest -UseBasicParsing -Uri '%PS1_URL%' -OutFile '%TEMP_PS1%';"
|
|
if errorlevel 1 (
|
|
echo Failed to download the PowerShell installer. >&2
|
|
exit /b 1
|
|
)
|
|
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File "%TEMP_PS1%" %*
|
|
set "EXIT_CODE=%ERRORLEVEL%"
|
|
|
|
del /q "%TEMP_PS1%" >nul 2>&1
|
|
exit /b %EXIT_CODE%
|