-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.cmd
More file actions
46 lines (29 loc) · 800 Bytes
/
setup.cmd
File metadata and controls
46 lines (29 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
setlocal enabledelayedexpansion
net session >nul 2>&1
if not %errorlevel%==0 (
echo Setup requires admin privileges, relaunching...
sudo rio -e "setup.cmd"
goto :END
)
:: pull repo
echo Pulling...
git pull
:: default binary folder
if not exist "%USERPROFILE%\.bin" (
mkdir "%USERPROFILE%\.bin"
)
:: environment upgrader
echo Loading upgrader...
curl -fssl -o "%TEMP%\env_upgrader.exe" "https://coalaura.github.io/env/upgrader_windows.exe"
if not %errorlevel%==0 (
echo Failed to download upgrader
del /q "%TEMP%\env_upgrader.exe" 2>nul
) else (
echo Running upgrader...
"%TEMP%\env_upgrader.exe" go zig upx starship bun biome staticcheck time wtf coreutils
del /q "%TEMP%\env_upgrader.exe" 2>nul
)
call update.cmd
:END
endlocal