Subversion Repositories SvarDOS

Rev

Rev 1650 | Details | Compare with Previous | Last modification | View Log | RSS feed

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