Subversion Repositories SvarDOS

Rev

Rev 680 | Rev 1650 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 680 Rev 1647
Line 1... Line 1...
1
@ECHO OFF
1
@ECHO OFF
-
 
2
REM :: NO PARAMS GIVEN?
-
 
3
IF "%1"=="" GOTO USERGUIDE
-
 
4
 
-
 
5
REM :: HELP ON HELP WANTED?
-
 
6
IF %1==/? GOTO HELPONHELP
-
 
7
 
-
 
8
REM :: UPCASE PARAM #1
-
 
9
SET OLDPATH=%PATH%
-
 
10
PATH %1
-
 
11
SET COMMAND=%PATH%
-
 
12
PATH %OLDPATH%
-
 
13
SET OLDPATH=
-
 
14
 
-
 
15
REM :: ANY SVARCOM INTERNAL COMMAND?
-
 
16
REM :: ALL UNDERSTAND THE /? SYNTAX
-
 
17
IF %COMMAND%==BREAK    GOTO RUNCOMMANDHELP
-
 
18
IF %COMMAND%==CALL     GOTO RUNCOMMANDHELP
-
 
19
IF %COMMAND%==CD       GOTO RUNCOMMANDHELP
-
 
20
IF %COMMAND%==CHDIR    GOTO RUNCOMMANDHELP
-
 
21
IF %COMMAND%==CHCP     GOTO RUNCOMMANDHELP
-
 
22
IF %COMMAND%==CLS      GOTO RUNCOMMANDHELP
-
 
23
IF %COMMAND%==COPY     GOTO RUNCOMMANDHELP
-
 
24
IF %COMMAND%==DATE     GOTO RUNCOMMANDHELP
-
 
25
IF %COMMAND%==DEL      GOTO RUNCOMMANDHELP
-
 
26
IF %COMMAND%==ERASE    GOTO RUNCOMMANDHELP
-
 
27
IF %COMMAND%==DIR      GOTO RUNCOMMANDHELP
-
 
28
IF %COMMAND%==ECHO     GOTO RUNCOMMANDHELP
-
 
29
IF %COMMAND%==EXIT     GOTO RUNCOMMANDHELP
-
 
30
IF %COMMAND%==FOR      GOTO RUNCOMMANDHELP
-
 
31
IF %COMMAND%==GOTO     GOTO RUNCOMMANDHELP
-
 
32
IF %COMMAND%==IF       GOTO RUNCOMMANDHELP
-
 
33
IF %COMMAND%==LN       GOTO RUNCOMMANDHELP
-
 
34
IF %COMMAND%==MD       GOTO RUNCOMMANDHELP
-
 
35
IF %COMMAND%==MKDIR    GOTO RUNCOMMANDHELP
-
 
36
IF %COMMAND%==PATH     GOTO RUNCOMMANDHELP
-
 
37
IF %COMMAND%==PAUSE    GOTO RUNCOMMANDHELP
-
 
38
IF %COMMAND%==PROMPT   GOTO RUNCOMMANDHELP
-
 
39
IF %COMMAND%==RD       GOTO RUNCOMMANDHELP
-
 
40
IF %COMMAND%==RMDIR    GOTO RUNCOMMANDHELP
-
 
41
IF %COMMAND%==REM      GOTO RUNCOMMANDHELP
-
 
42
IF %COMMAND%==REN      GOTO RUNCOMMANDHELP
-
 
43
IF %COMMAND%==RENAME   GOTO RUNCOMMANDHELP
-
 
44
IF %COMMAND%==SET      GOTO RUNCOMMANDHELP
-
 
45
IF %COMMAND%==SHIFT    GOTO RUNCOMMANDHELP
-
 
46
IF %COMMAND%==TIME     GOTO RUNCOMMANDHELP
-
 
47
IF %COMMAND%==TRUENAME GOTO RUNCOMMANDHELP
-
 
48
IF %COMMAND%==TYPE     GOTO RUNCOMMANDHELP
-
 
49
IF %COMMAND%==VER      GOTO RUNCOMMANDHELP
-
 
50
IF %COMMAND%==VERIFY   GOTO RUNCOMMANDHELP
-
 
51
IF %COMMAND%==VOL      GOTO RUNCOMMANDHELP
-
 
52
 
-
 
53
REM :: LOOKUP HELP FILE FOR ANY EXTERNAL COMMANDS
-
 
54
IF EXIST %DOSDIR%\HELP\EN\%COMMAND%.AMB SET AMBFILE=%DOSDIR%\HELP\EN\%COMMAND%
-
 
55
IF EXIST %DOSDIR%\HELP\%LANG%\%COMMAND%.AMB SET AMBFILE=%DOSDIR%\HELP\%LANG%\%COMMAND%
-
 
56
REM :: PARAM #2 BECOMES PARAM #1 TO SPECIFY CHAPTER NAME
-
 
57
IF NOT "%AMBFILE%"=="" SHIFT
-
 
58
IF NOT "%AMBFILE%"=="" GOTO RUNAMB
-
 
59
 
-
 
60
REM :: EXTERNAL (CORE) COMMAND PRESENT?
-
 
61
IF EXIST %DOSDIR%\%COMMAND%.COM GOTO RUNCOMMANDHELP
-
 
62
IF EXIST %DOSDIR%\%COMMAND%.EXE GOTO RUNCOMMANDHELP
-
 
63
IF EXIST %DOSDIR%\BIN\%COMMAND%.COM GOTO RUNCOMMANDHELP
2
IF EXIST %DOSDIR%\HELP\HELP-%LANG%.AMB GOTO USELANG
64
IF EXIST %DOSDIR%\BIN\%COMMAND%.EXE GOTO RUNCOMMANDHELP
-
 
65
 
-
 
66
:USERGUIDE
-
 
67
REM :: LOOKUP HELP FILE FOR SVARDOS USER GUIDE
-
 
68
REM :: PARAM #1 SPECIFIES CHAPTER NAME
3
AMB %DOSDIR%\HELP\HELP-EN.AMB %1
69
IF EXIST %DOSDIR%\HELP\HELP-EN.AMB SET AMBFILE=%DOSDIR%\HELP\HELP-EN
-
 
70
IF EXIST %DOSDIR%\HELP\HELP-%LANG%.AMB SET AMBFILE=%DOSDIR%\HELP\HELP-%LANG%
-
 
71
IF NOT "%AMBFILE%"=="" GOTO RUNAMB
-
 
72
 
-
 
73
ECHO SORRY! NO HELP AVAILABLE
-
 
74
GOTO DONE
-
 
75
 
-
 
76
:HELPONHELP
-
 
77
ECHO HELP [COMMAND] [CHAPTER]
-
 
78
GOTO DONE
-
 
79
 
-
 
80
:RUNCOMMANDHELP
-
 
81
%COMMAND% /?
4
GOTO DONE
82
GOTO DONE
5
 
83
 
6
:USELANG
84
:RUNAMB
7
AMB %DOSDIR%\HELP\HELP-%LANG%.AMB %1
85
AMB %AMBFILE%.AMB %1
8
 
86
 
9
:DONE
87
:DONE
-
 
88
SET COMMAND=
-
 
89
SET AMBFILE=