|
|
The admin(CP) command administers SCCS files; that is, it creates new SCCS files and changes the parameters of existing ones. When an SCCS file is created, its parameters are initialized by use of key letters with admin, or are assigned default values if no key letters are supplied. The same key letters are used to change the parameters of existing SCCS files.
Two key letters are used in detecting and correcting corrupted SCCS files. (See ``Auditing''.)
Newly created SCCS files are given access permission mode 444 (read only), and are owned by the effective user. Only a user with write permission in the directory containing the SCCS file may use the admin command on that file.
An SCCS file can be created by executing the following command:
admin -ifirst s.abc
The value first with the -i option is the name of the file from which the text of the initial delta of the SCCS file, s.abc, is to be taken. Omission of a value with -i indicates that admin is to read the standard input for the text of the initial delta.
The following command is equivalent to the previous example:
admin -i s.abc < first
If the text of the initial delta does not contain ID keywords, admin issues the following warning message:
No id keywords (cm7)However, if the command also sets the SCCS file i flag (not to be confused with the -i command line option), then the message is treated as an error and the SCCS file is not created. Only one SCCS file may be created at a time using admin -i.
The -r option used in conjunction with
admin creates a release number for the first delta.
admin -ifirst -r3 s.abc
This command specifies that the first delta should be named 3.1 rather than the normal 1.1. Because -r has meaning only when creating the first delta, its use is permitted only with -i.
When an SCCS file is created, the user may want to record why this was done. Comments (admin -y) and/or MR numbers (-m) can be entered in exactly the same way as a delta.
If the -y option is omitted, a comment line of the following form is generated:
date and time created yy/mm/dd hh:mm:ss by lognameIf it is desired to supply MR numbers (admin -m), the SCCS file v flag must be set by means of the -f command line option. The v flag simply determines whether MR numbers must be supplied when using any SCCS command that modifies a delta commentary. For example:
Part of an SCCS file is reserved for descriptive text, usually a summary of the file's contents and purpose. It can be initialized or changed by using admin -t.
When an SCCS file is first being created and -t is used,
it must be followed by the name of
a file from which the descriptive text is to be taken.
For example, the following command
specifies that the descriptive text is to be taken from file desc.
admin -ifirst -tdesc s.abc
When processing an existing SCCS file,
-t specifies that the descriptive text (if any)
currently in the file is to be replaced with the text in the named file.
Omission of the filename after the -t key letter
results in the removal of the descriptive text from the
SCCS file. For example:
admin -t s.abc
The flags of an SCCS file may be initialized or changed by admin -f or deleted by means of -d.
SCCS file flags direct certain actions of the various commands. (See admin(CP) for a description of all the flags.) For example, the i flag specifies that a warning message (stating that there are no ID keywords contained in the SCCS file) should be treated as an error. The d (default SID) flag specifies the default version of the SCCS file to be retrieved by the get command.
The admin -f command sets flags and, if
desired, their values.
In the following example,
the i and m (module name) flags
are set.
admin -ifirst -fi -fmmodname s.abc
The value modname specified for the m flag is the value that the get command uses to replace the %M% ID keyword. (In the absence of the m flag, the name of the g-file is used as the replacement for the %M% ID keyword.) Several -f key letters may be supplied on a single admin, and they may be used whether the command is creating a new SCCS file or processing an existing one.
The admin -d command deletes a flag from an
existing SCCS file.
For example:
admin -dm s.abc
This command removes the m flag from the SCCS file. Several -d key letters may be used with one admin and may be intermixed with -f.
SCCS files contain a list of login names
and/or group IDs of users who are allowed to create deltas.
This list is empty by default, allowing anyone to create deltas.
To create a user list (or add to an existing one),
use admin -a.
For example:
admin -axyz -awql -a1234 s.abc
This adds the login names xyz and wql and the group ID 1234 to the list. The admin -a command may be used whether creating a new SCCS file or processing an existing one.
The admin -e command (erase) removes login names or group IDs from the list.