File tree Expand file tree Collapse file tree 1 file changed +27
-24
lines changed
Expand file tree Collapse file tree 1 file changed +27
-24
lines changed Original file line number Diff line number Diff line change 1- rem This script downloads Eldev startup script as `USERPROFILE/.eldev/bin/eldev'
2- rem for use in a GitHub workflow.
3- rem
4- rem curl.exe is included in Windows 10 since April-2018-Update (1803)
5- rem In your `.github/workflows/*.yml' add this:
6- rem
7- rem run: curl.exe -fsSL https://raw.github.com/doublep/eldev/master/webinstall/github-eldev.bat | cmd
8- rem
9-
10- rem optionally pass download URL as paramater to allow testing in eldev PRs
11- IF [%1 ] == [] (
12- set URL = https://raw.githubusercontent.com/doublep/eldev/master/bin/eldev.bat
13- ) else (
14- set URL = %1
15- )
16-
17- set ELDEV_BIN_DIR = %USERPROFILE% \.eldev\bin
18-
19- mkdir %ELDEV_BIN_DIR%
20-
21- curl.exe -fsSL %URL% -o %ELDEV_BIN_DIR% \eldev.bat
22-
23- echo %ELDEV_BIN_DIR% >> %GITHUB_PATH%
24-
1+ @ echo off
2+ rem This script downloads Eldev startup script as `%USERPROFILE%/.eldev/bin/eldev'.
3+ rem
4+ rem curl.exe is included in Windows 10 since April-2018-Update (1803)
5+ rem In your `.github/workflows/*.yml' add this:
6+ rem
7+ rem curl.exe -fsSL https://raw.github.com/doublep/eldev/master/webinstall/github-eldev.bat | cmd /Q
8+
9+ rem The usual way to check for the presence of an argument is to test
10+ rem if their argument reference %[1-9] has a value. Though when piping
11+ rem to cmd, these references do not exist and instead is better to use
12+ rem a counter.
13+ set ARGS = 0
14+ for %%x in (%* ) do set /A ARGS += 1
15+
16+ rem optionally pass download URL as parameter to allow testing in PRs
17+ set URL = https://raw.githubusercontent.com/doublep/eldev/master/bin/eldev.bat
18+ if %ARGS% == 1 set URL = %1
19+
20+ set ELDEV_BIN_DIR = %USERPROFILE% \.eldev\bin
21+
22+ mkdir %ELDEV_BIN_DIR%
23+
24+ curl.exe -fsSL %URL% -o %ELDEV_BIN_DIR% \eldev.bat || exit /b
25+
26+ echo %ELDEV_BIN_DIR% >> %GITHUB_PATH%
27+
You can’t perform that action at this time.
0 commit comments