-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path!template.cmd
More file actions
68 lines (45 loc) · 1003 Bytes
/
!template.cmd
File metadata and controls
68 lines (45 loc) · 1003 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
:: Template for AAA *- commands
:: Boilerplate/Skeleton for scripts
:: Goal : Unify COnsole+GUI+MicroConsole+Languages+Utils+Applications
:ENTRY
setlocal
CALL aaa-log %0 %*
::if "%~1"=="" goto CATCH1
:INITIALIZE
:: prompt ^>
:: set aavShell=0
:: call !isShell.cmd
:: if errorlevel 1 set aavShell=1
:: if %aavShell%==1 mode con lines=8 cols=64
:BEGIN
:MAIN
:: if "%~1"=="" goto :CATCH1
:: enable parameter test
:: and jump to :CATCH1 if using parameters
Call aaa-main "%~f0"
echo,
echo,
if ERRORLEVEL 1 goto :CATCH0
goto END
:CATCH0
Call AAA-Error %0 %* ~ no GREP or other command error
Timeout 60
goto :END
:CATCH1
:: Call aaa-main "%~f0"
:: Call aaa-message "Use:" "" "%~n0 <object>"
goto :END
:END
echo,
echo,
:FINALIZE
:EXIT
endlocal
exit /b
:OBS
<command>-*
Template for aaa-* scripts (language agnostic)
*-method1 ___ short explain...
*-method2 ___ short explain...
...
: