home *** CD-ROM | disk | FTP | other *** search
-
- Startup Script Switcher 2.0
-
- (c) 1993 Martin Mares, MJSoft System Software
-
- ==============================================================================
-
-
- Introduction
- ------------
-
- Some months ago, I wrote a small utility called SwitchScript, which was
- able to execute scripts named S:Startup.xxxxx, where xxxxx was the version
- of currently running Kickstart. This utility was very useful, but had many
- disadvantages (when a registered developer upgraded his 39.110 to 39.115, he
- had to rename or copy his startup script ...). It's the reason why I have
- written another small utility named SwitchScript 2.0.
-
- SwitchScript and its documentation are Copyright (C) MJSoft System Software
- 1993, Prague, Czech Republic. They may be distributed only as a part of the
- MKick archive. They also may be included in the SKick archive.
-
-
- Usage
- -----
-
- SwitchScript is completely command-line controlled. But if you don't want
- to do anything with these mysteriously-named parameters, you can just say:
-
- SwitchScript
-
- In this case, SwitchScript will behave similarly to its older version.
- It will simply execute a script named S:Startup-vv, where vv is version number
- of Kickstart you are currently using.
-
- If you use SwitchScript 1.0 and you want to use your old scripts with
- new SwitchScript, you should use:
-
- SwitchScript *=S:Startup.%v%r
-
- But there are many other methods how to switch the scripts... They may be
- specified using the parameter line. This line consists of definition fields
- separated by spaces. Each field has the following form:
-
- <version>=<script name>
-
- Where <version> is Kickstart version pattern consisting of digits and/or an
- asterisk sign ("*"), which means "any number of any digits". For example:
- 34005 is equivalent to Kickstart version 34.5 (the old 1.3), 39* means any
- Kickstart with version 39 (3.0) and * matches all Kickstart versions.
-
- <script name> is a name of script executed if we're using specified Kickstart.
- If this name doesn't contain a path (it means it doesn't have any ':' or '/'
- in it), 'S:Startup-' is inserted before it. Any '%v' is replaced by Kickstart
- version (two digits) and '%r' is replaced by Kickstart revision (three digits).
- (If we're using KS 34.5, %v%rx will expand to S:Startup-34005x, S:St-%v to
- S:St-34 etc.)
-
- If there is no matching version pattern, the standard script (S:Startup-%v%r)
- will be executed.
-
-
- Example: SwitchScript 34005=WB13:S/Startup-sequence 3911*=beta
-
- It will execute WB13:S/Startup-sequence in case we're using KS 1.3
- S:Startup-beta on condition we're using KS 39.110,39.115...
- S:Startup-37 if we're using 37.175
- S:Startup-39 if we're using 39.106
- S:Startup-40 if we're using 40.055
- ...
-
- If you use Kickstart 1.X, SwitchScript requires C:Run (standard command).
-
- Warning: Scripts started by SwitchScript must not contain any conditional
- processing, because SwitchScript uses slightly faster method of their execution,
- which doesn't support conditionals.
-
- Technical note: SwitchScript uses Execute("",Open(script,MODE_OLDFILE),
- Output()). If you have an idea how to do it better, let me know.
-
-
- Return codes
- ------------
-
- Because I'm very lazy and I tried to make this program small, SwitchScript
- displays NO error messages. All kinds of errors are signalized by different
- return codes:
-
- 0 - everything is OK
- 20 - startup script failed / C:Run not present
- 21 - command-line syntax error
- 22 - script name too long (maximum is 63 characters)
- 23 - startup script not found
-
-
- Installation
- ------------
-
- First create the startup scripts for all the Kickstarts used. These scripts
- have to contain no final EndCLI statements.
-
- Copy SwitchScript to your C: directory and replace your
- Startup-sequence by following text:
-
- MKick (or SKick if you have 2.0 or higher)
- SwitchScript
- EndCLI
-
-
- Final words
- -----------
-
- Send all suggestions, comments and bug reports to mjsoft@k332.feld.cvut.cz.
-