2 pushd "%userprofile%" || goto :error
4 mkdir .local || goto :error
6 IF NOT EXIST .local\bin (
7 mkdir .local\bin || goto :error
9 IF NOT EXIST .local\opt (
10 mkdir .local\opt || goto :error
13 pushd .local\bin || goto :error
14 if NOT EXIST pathman.exe (
15 echo updating PATH management
16 powershell $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://webinstall.dev/packages/pathman/install.bat -OutFile pathman-setup.bat || goto :error
17 call .\pathman-setup.bat || goto :error
18 del pathman-setup.bat || goto :error
19 rem TODO there's rumor of a windows tool called 'pathman' that does the same thing?
22 .\.local\bin\pathman add ".local\bin" || goto :error
24 echo downloading and installing %1
25 powershell $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://webinstall.dev/packages/%1/install.ps1 -OutFile %1-webinstall.bat || goto :error
27 rem TODO only add if it's not in there already
28 PATH .local\bin;%PATH%
30 call %1-webinstall.bat || goto :error
31 del %1-webinstall.bat || goto :error
37 echo Failed with error #%errorlevel%.