-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.cmd
More file actions
46 lines (36 loc) · 725 Bytes
/
demo.cmd
File metadata and controls
46 lines (36 loc) · 725 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
set cDir=%CD%
cd /d %~dp0
set helpTxt=%CD%\demo_options.txt
cd ..
set docopts=%CD%\build\docopts.exe
set glob=%CD%\build\glob.exe
set tmpCmd=%CD%\build\tmp.cmd
echo.
echo - docopts
if not exist %docopts% (
echo first build %docopts% to proceed
exit /b 1
)
%docopts% %helpTxt% %* > %tmpCmd%
if %errorlevel% NEQ 0 exit /b %errorlevel%
call %tmpCmd%
if %_h% (
echo Usage: %~nx0 [options] [args]
type %helpTxt%
exit /b 0
)
echo options: -c: %_c% -t: %_t% -H %_Hu% -o: %_o%
echo args: %_args%
cd %cDir%
echo.
echo - glob
if not exist %glob% (
echo first build %glob% to proceed
exit /b 1
)
%glob% -p "<X>" -x "echo <X>" %_args% > %tmpCmd%
echo args:
call %tmpCmd%
ENDLOCAL