home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
GWINDOWS
/
scriptmaster.lzh
/
readme
next >
Wrap
Text File
|
1996-01-01
|
7KB
|
158 lines
Script Master
shell script manager for G-Windows
Copyright 1994, 1996 by Stephen Carville
This program provides an integrated environment for managing your commonly
used shell scripts. You can Edit, Create, Delete, Rename and Run shell
script without ever leaving the program environment.
Getting Started
For convenience, you may specify the editor to use with an environment
variable. The program will look for the variable named "EDITOR" first and
the name "EDIT" second. Both of these are common to many other OS9 programs
so may well be defined already. If either is defined, the editor named will
be used. If no editor is specified, the program will default to umacs.
To start the program chd to your GWINDOWS directory and use 'makdir' to
create a new directory. If you have extracted the complete archive the
default directory has already been created for you.
Now type "scriptmaster <>>>/win&" at the shell prompt or double click on the
program icon. IT IS VERY IMPORTANT THAT YOU USE I/O REDIRECTION. Script-
master must be able to control it's own windows so will close all standard
paths to it's startup window which may cause that window to dissappear.
Two command line options are available. You may change the title displayed
on the window bar and hibernate icon and you may specify the directory to
read scripts from:
-t=<new title> - title to display. Default="Scripts"
-d=<directory> - directory to get scripts from.
default=$(HOME)/GWINDOWS/WORK_OUT.SCRIPTS
"$(HOME)" is the directory specified in your HOME environment variable. If
unavailable, the default device specified on startup by init is used - this
is usually "/dd". This practice of using the HOME environment variable
allows scriptmaster to work on G-Windows systems which have several users,
each with their own HOME directory.
The command line convention lets you have more than one script directory
and several copies of scriptmaster running with each monitoring a different
directory. A sample startup.gw entry might look like:
scriptmaster <>>>/win&
scriptmaster -t=Games -d=/dd/GWINDOWS/GAMES <>>>/win&
This will start up scriptmaster twice but each will have a different title
and run scripts from a different directory.
If the directory specified or the default is not available the program will
terminate with an error advisory.
The program will start up as a hibernate icon so you will have to click on
this to bring up the program window. If any scripts are available in the
directory being monitored, they will be displayed in the scrolling window
at the right. To run a script, either double click on it's name or select
the name with the mouse and click on the "run" button.
When a script begins running it will print to a specially created terminal
window which will be terminated when the script is done. When the script
is finished, scriptmaster will reappear as a hibernate icon.
Commands
+-------------------------------------------------------------------+
| +----------------------------+ +-------------------------------+ |
| | <name of selected script> | | <list of available scripts> | |
| +----------------------------+ | | |
| +-----+ | | |
| | Run | | | |
| +-----+ | | |
| | | |
| Script Master v.vv | | |
| By Stephen Carville | | |
| Copyright (c) 1996 | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| +-------------------------------+ |
+-------------------------------------------------------------------+
Menu options (right mouse button click):
Run Script - This causes your script to be executed just like you had
typed the name at a shell prompt. Same as the "Run" button
Edit Script - Calls the editor so that the script may be modified.
Rename Script - Renames the currently selected script.
Delete Script - Deletes the selected script. Prompts to be certain you
really want to do this.
New Script - Asks for a name for a new script and passes it to the editor
Refresh List - Refreshes the displayed list. This will normally be done
automatically when any changes are made but, because scripts
can be copied in manually, is included as a just-in-case.
Quit - Frees all memory and quits the program.
Caveats and helpful information:
When creating scripts for scriptmaster any program you wish to start up in
it's own window must use I/O redirection unless the program creates it's
own. Scriptmaster will terminate the window it creates to run the script.
Because scriptmaster waits for the script to finish and the shell created to
die it can be monopolized by a script that forks a program without the "&"
operator. To avoid this always use the "&" operator on any programs that
are to continue running after the script terminates. For example:
-t
#set up a shell window attached to the directory
setenv HOME /dd/C/SOURCE
chd
setenv _sh 0
shell -l <>>>/win&
# setup a special window for the editor 'ed'
setenv WINDOW TX=81,TY=32,BS=$08,QF=-1,TF=$00ffff,TB=$600000,FR=1
setenv QTERM vt32
ed <>>>/win&
This script will chance to the C/SOURCE directory, start a shell and start
the editor 'ed' in a specially defined window. Of course if the programs
called MUST run sequentially - such as some backup scripts do - you will
either have to wait to get control back or adopt a strategy something like:
chd /dd/C/SOURCE
backup_source <>>>/win&
This will change to the C/SOURCE directory and call another script called
"backup_source" to do the actual work. This frees scriptmaster quickly and
the backup continues as an independent process.
As demonstrated above, it's not uncommon for one script to call another. To
avoid confusion scriptmaster adopts a special naming convention so that only
the desired scripts are displayed. Any script that scriptmaster is to
display and access must begin with 'wk_' in lower case. This is normally
taken care of by the program but if you intend to copy scripts in manually,
you need to be aware of it.
Report any comments, suggestions, bug reports, etc to:
Stephen Carville
pagan@delphi.com
High G Software
P.O. Box 822
Glendora, CA 91740
(818) 914-2511