Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
AIPS++ initialization procedure.
. aipsinit.sh
...for Bourne-like shells, e.g. sh, bash, ksh
source aipsinit.csh
...for C-like shells, e.g. csh, tcsh
. aipsinit.rc
...for the rc shell
. aipsinit.es
...for the es shell
The aipsinit scripts define the $AIPSPATH environment variable required by AIPS++, and modify the PATH environment variable (and MANPATH if defined) to include the relevant AIPS++ bin (and man) directories. They are normally invoked at login by the .profile or .login files.
The $AIPSPATH environment variable consists of a sequence of four character strings separated by spaces containing the following information:
aipsinit modifies the PATH environment variable to include the AIPS++ binary directories as follows:
The keyword mechanism allows full control over placement of the AIPS++ bin directories in PATH and is the recommended method.
If $AIPSPATH is already defined when aipsinit is invoked it will also check for any AIPS++ programmer directories in the PATH, for example any referring to programmer bin directories, and if so will attempt to amend them. This works only if the programmer workspace is rooted at a directory named aips++.
If the MANPATH environment variable is defined, aipsinit modifies it in the same manner as for PATH except using the aips_doc keyword. If the aips_doc keyword is not present, the AIPS++ man area is always added to the start of MANPATH.
The host ``architecture'', a string of the form <base>[_<ext>], corresponds to a subdirectory of the AIPS++ root directory in which an AIPS++ system resides (object libraries, executables,...). The base part of the name is a mnemonic predefined by AIPS++ which describes the binary format of a machine and reflects the combination of machine architecture and operating system. The optional extension is used to select between alternative systems of the same binary format, for example as may have been generated by different compilers.
aipsinit recognizes an environment variable (or shell variable in aipsinit.csh) aips_ext which, if defined, overrides the architecture extension defined in the aipshosts (p) file for a particular machine. By convention, setting aips_ext to ``_'' signals no extension, that is, any architecture extension specified in aipshosts is stripped off. For certain shells (bash, csh, es, ksh, rc, and tcsh) aipsinit also defines an alias or shell function also called aipsinit which takes a value for aips_ext as an argument and reinvokes aipsinit. This provides a convenient mechanism for interactively switching between architecture extensions. Note that aipsinit always undefines aips_ext.
The aipsinit scripts take no options directly (such scripts cannot take arguments). However, see the description of the aips_bin and aips_doc keywords above, and also the aips_ext environment (or shell) variable.
The information for setting the architecture and site name is contained in the aipshosts (p) file. If this does not contain an entry for a particular machine, aipsinit tries to deduce it.
For Bourne-like shells the following sequence might be used in .profile:
PATH=".:$HOME/bin:aips_bin:/usr/local/bin:/usr/ucb:/usr/bin:/bin" MANPATH=".:$HOME/man:aips_doc:/usr/local/man:/usr/man" [ -f /aips++/aipsinit.sh ] && . /aips++/aipsinit.sh
For C-like shells the following sequence might be used in .login:
setenv PATH ".:~/bin:aips_bin:/usr/local/bin:/usr/ucb:/usr/bin:/bin" setenv MANPATH ".:~/man:aips_doc:/usr/local/man:/usr/man" if (-f /aips++/aipsinit.csh) source /aips++/aipsinit.csh
or alternatively
set path = (. ~/bin aips_bin /usr/local/bin /usr/ucb /usr/bin /bin) if (-f /aips++/aipsinit.csh) source /aips++/aipsinit.csh
For the rc shell the following sequence might be used in .rcrc:
PATH=.:$HOME/bin:aips_bin:/usr/local/bin:/usr/ucb:/usr/bin:/bin MANPATH=.:$HOME/man:aips_doc:/usr/local/man:/usr/man if (test -f /aips++/aipsinit.rc) . /aips++/aipsinit.rc
For the es ``extensible'' shell the following sequence might be used in .esrc:
PATH=.:$HOME/bin:aips_bin:/usr/local/bin:/usr/ucb:/usr/bin:/bin MANPATH=.:$HOME/man:aips_doc:/usr/local/man:/usr/man if {test -f /aips++/aipsinit.es} {. /aips++/aipsinit.es}
The .login (p) and .profile (p) files are provided for aips2mgr's interactive and cron jobs.
aipshosts (p), AIPS++ hosts database.
.login (p), aips2mgr's .login file.
.profile (p), aips2mgr's .profile file.
Original: 1992/03/05 by Mark Calabretta, ATNF.