ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s
43 lines
1.3 KiB
Batchfile
43 lines
1.3 KiB
Batchfile
@echo off
|
|
setlocal EnableExtensions
|
|
|
|
set "SCRIPT_URL=%DOSH_INSTALL_PS1%"
|
|
if "%SCRIPT_URL%"=="" set "SCRIPT_URL=https://git.palav.dev/Palav/dosh/raw/branch/main/install.ps1"
|
|
|
|
set "PS="
|
|
for %%P in (powershell.exe pwsh.exe powershell pwsh) do (
|
|
if not defined PS (
|
|
where %%P >nul 2>nul && set "PS=%%P"
|
|
)
|
|
)
|
|
|
|
if not defined PS (
|
|
echo missing required command: powershell.exe or pwsh.exe 1>&2
|
|
exit /b 1
|
|
)
|
|
|
|
set "TMP_PS=%TEMP%\dosh-install-%RANDOM%-%RANDOM%.ps1"
|
|
set "DOSH_INSTALL_PS1_URL=%SCRIPT_URL%"
|
|
set "DOSH_INSTALL_PS1_PATH=%TMP_PS%"
|
|
|
|
"%PS%" -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; $ProgressPreference='SilentlyContinue'; Invoke-WebRequest -UseBasicParsing -Uri $env:DOSH_INSTALL_PS1_URL -OutFile $env:DOSH_INSTALL_PS1_PATH"
|
|
if errorlevel 1 (
|
|
del "%TMP_PS%" >nul 2>nul
|
|
exit /b 1
|
|
)
|
|
|
|
"%PS%" -NoProfile -ExecutionPolicy Bypass -File "%TMP_PS%" %*
|
|
set "RC=%ERRORLEVEL%"
|
|
del "%TMP_PS%" >nul 2>nul
|
|
|
|
set "DOSH_CMD_PREFIX=%PREFIX%"
|
|
if "%DOSH_CMD_PREFIX%"=="" set "DOSH_CMD_PREFIX=%USERPROFILE%\.local"
|
|
set "DOSH_CMD_BINDIR=%DOSH_CMD_PREFIX%\bin"
|
|
set "DOSH_NEXT_PATH=%PATH%"
|
|
if "%RC%"=="0" (
|
|
echo ;%PATH%; | find /I ";%DOSH_CMD_BINDIR%;" >nul 2>nul
|
|
if errorlevel 1 set "DOSH_NEXT_PATH=%DOSH_CMD_BINDIR%;%PATH%"
|
|
)
|
|
|
|
endlocal & set "PATH=%DOSH_NEXT_PATH%" & exit /b %RC%
|