From 8a6d697308162874a236c84aac0b0f8c7ac01f83 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Tue, 1 Sep 2026 14:48:45 +0300 Subject: refactor: separate website presentation from runtime --- distribution/install.cmd | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 distribution/install.cmd (limited to 'distribution/install.cmd') diff --git a/distribution/install.cmd b/distribution/install.cmd new file mode 100644 index 00000000..325e3b38 --- /dev/null +++ b/distribution/install.cmd @@ -0,0 +1,21 @@ +@echo off +setlocal + +set "INSTALLER_URL=https://herdr.dev/install.ps1" +set "CURL_PROTOCOL=--proto =https --tlsv1.2" +if defined HERDR_INSTALLER_URL ( + set "INSTALLER_URL=%HERDR_INSTALLER_URL%" + set "CURL_PROTOCOL=--proto =http,https" +) +set "INSTALLER_PATH=%TEMP%\herdr-install-%RANDOM%-%RANDOM%.ps1" + +curl.exe --fail --silent --show-error --location --connect-timeout 30 --speed-limit 1024 --speed-time 30 %CURL_PROTOCOL% --output "%INSTALLER_PATH%" -- "%INSTALLER_URL%" +if errorlevel 1 ( + del /f /q "%INSTALLER_PATH%" >nul 2>&1 + exit /b 1 +) + +powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%INSTALLER_PATH%" %* +set "INSTALLER_EXIT=%ERRORLEVEL%" +del /f /q "%INSTALLER_PATH%" >nul 2>&1 +exit /b %INSTALLER_EXIT% -- cgit v1.2.3