Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (1) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought



workon(1)           UNIX Programmer's Manual            workon(1)



NAME
     workon - create a new set and put the user in it

SYNOPSIS
     workon   [-v -nosh] [-sb sandbox] [-setdir directory] [-rc
              user-rcfile] [-sb_rc sandbox-rcfile]
              [setname]

     workon   -undo [-v -auto] [-sb sandbox] [-rc user-rcfile]
              [-sb_rc sandbox-rcfile] [setname]

     workon   -list [-sb sandbox] [-rc user-rcfile]

     workon   -usage

     workon   -rev

FLAGS
     -v   Print out information about what workon is doing while
          it is doing it.

     -nosh
          After creating the new set, workon does not create a
          new shell and move the user into it.  If the set
          already exists and this option is used, workon does
          nothing.

     -sb sandbox
          Name of the sandbox to use if it is not the current
          sandbox.  If this option is not used, the sandbox will
          be determined by the environment variable SANDBOX or,
          if that is not set, by the user's default sandbox.

     -setdir directory
          When creating a set, this option is used to establish
          the default set directory for the set.  The default set
          directory is the directory which workon cd's to when it
          opens a new shell.  If this option is used with an
          existing set, the new directory is created and workon
          cd's the user to that directory instead of the default.

     -rc rc-file
          Provides the path and name of the user's rc file to use
          instead of the default file ${HOME}/.sandboxrc.  If
          this option is not used, the default rc file will be
          used.

     -sb_rc sandbox-rcfile
          Provides the path and name of the sandbox's rc file to
          use instead of the default file sandbox/rc_files/local.
          If this option is not used, the default sandbox rc file
          will be used.



Printed 1/23/91              5/7/90                             1





workon(1)           UNIX Programmer's Manual            workon(1)



     -undo
          Removes an existing set.  This option only works if no
          files have been checked out into the set.  If files
          have been checked out, the user will need to do a bsub-
          mit with the -outdate option.

     -auto
          Used in conjunction with the -undo option, this option
          will allow a set to be removed without user confirma-
          tion.

     -list
          List the default and available sets for a given sand-
          box.

     -usage
          Prints a brief usage message.

     -rev Prints the revision information.

     workon is used to create a new set and to start working
     within existing sets.  After creating the set, establishing
     the proper environment, and cd'ing to the set's directory,
     it opens a new shell with all this in place for the user to
     work in.


DESCRIPTION
     workon does two different but related functions: it creates
     a new set, and it puts a user in that set in the appropriate
     environment.

     Create Set

     workon first determines if the set the user has specified
     exists by checking the file sbname/rc_files/sets.  If the
     user doesn't specify a set, workon uses the default set for
     the current sandbox (in which case, it certainly ought to
     exist).  If the set doesn't exist, workon will create it and
     add it to the sbname/rc_files/sets file.

     Set names for workon are normally given without the user's
     name in front and workon adds this; so, for example, if the
     set name give by the user, suzieq, was wakeup, workon will
     create a set called suzieq_wakeup.  When the name is entered
     in the sbname/rc_files/sets and when workon sets the
     environment variable BCSSET, the full set name will be used.
     Note: an exception to this are set names which being with
     capital letters, A-Z; these are assumed to be sets for
     shared use and therefore are not changed.  User's should not
     begin a set name with a capital letter unless the set is to
     be shared.



Printed 1/23/91              5/7/90                             2





workon(1)           UNIX Programmer's Manual            workon(1)



     As part of the process of creating a new set, workon will
     create a default directory for the set and put that informa-
     tion in the file /sandbox/rc_files/sets.  It is this direc-
     tory that workon cd's to just before it opens the new shell.

     Put User in Set

     If the user does not specify the -nosh option, workon will
     continue, after creating the set, to put the user in it.  If
     the set already exists, this becomes the primary function of
     workon.

     To put a user in a set means to set the environment vari-
     ables SANDBOX and BCSSET to the correct values, change
     directories to the appropriate place and open a new shell.
     If the user specifies the directory to change to with the
     -setdir option, workon will create it if necessary and
     change to it; otherwise it uses the default set directory
     listed in the /sandbox/rc_files/sets file.

     Because workon uses the sandbox's rc files to establish its
     environment, it actually sets all the "setenv's" in the rc
     files.  Then, because it opens a new shell, the variables
     remain set.  The final result of this is that any time a
     developer is in a workon sub-shell, the entire environment
     will be set.

     Listing Sets
     The -list option can be used to list the existing sets
     within a sandbox.  It takes as an argument, the name of the
     sandbox or, if not given, will default to the current sand-
     box.

     Undo Set
     workon has an -undo option which will remove the set from
     the sandbox and from the  sbname/rc_files/sets file.  It
     only works, however, if no files have been checkout out into
     the set.  In that case, it is necessary to use bsubmit to
     submit the files and outdate the set; or, if the files are
     to be completely ignored, they can be outdated using bcs -o.

EXAMPLES
     workon -sb symphony -setdir /usr/bin wakeup
          Creates the set wakeup with the default set directory
          as /usr/bin. The set is associated with the sandbox
          symphony. If the set already exists, it creates the
          directory /usr/bin if necessary, changes directory to
          there, sets the environment for the set wakeup, and
          opens a new shell.

     workon wakeup
          Puts the user into the set wakeup. This type of call is



Printed 1/23/91              5/7/90                             3





workon(1)           UNIX Programmer's Manual            workon(1)



          normally given when the set already exists.  If the set
          doesn't exist, this call would create a new set in the
          current sandbox with a set directory of ".", i.e. in
          the sandbox's source directory.


FILES
     ${HOME}/.sandboxrc
          rc file that specifies default and existing sandboxes.

     sbname/rc_files/sets
          list of valid sets in each sandbox as well as the
          default set.

     sbname/rc_files/local
          the environment for the current sandbox; includes
          sbnamercfiles/shared


EXIT VALUES
     workon returns '0' upon successful completion, '-1' other-
     wise.


RELATED INFORMATION
     bcs(1), bsubmit(1), mksb(1), sandbox(7) sandboxrc(5).





























Printed 1/23/91              5/7/90                             4



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026