Skip to content
Kermin E Fleming edited this page Feb 15, 2015 · 1 revision

Awb-shell

Usage:


awb-shell workspace ]
[
-package ]
[—model ]
[—benchmark ]
[—module ]
[—repositoryDB ]
[—file ]
[—help]
[—[no]locking]
[—[no]warnings]
[—[no]configcheck]
[[-
command…]

Description:

This is a program that provides a command line interface
to manipulate various ASIM objects.  The command line pro­vides 
initial default values for various objects that can be manipulated. 
The "set" command can be used to set or reset these values. Use the 
command "help" to list the individual commands.

If Text::ReadLine::Gnu is installed then command line com­pletion 
will be available inside the shell.

Switches:


The following command line switches are currently sup­ported: —workspace Set current workspace to be rooted at the directory . Impliclty this sets the environment vari­
able $AWBLOCAL to be and the file $AWBLO­
CAL/awb.config must exist.

—package
Set the current package, i.e., a checked out reposi­
tory, to be . Package names are divined from
the files in the AWB search path at admin/packages/*,
by convention these are frequently found at $AWBLO­
CAL/src/.

—model
Set the current model to , where is a
model configuration file (.apm). Defaults to environ­
ment variable $AWB_MODEL if set.

—benchmark
Set the current benchmark to , where
is a benchmark configuration file (.cfg).
Defaults to environment variable $AWB_BENCHMARK if
set.

—module
Set the current module to , where is
a model .awb file.

—repositoryDB [:]…
Set the source for the information on available
repositories to a path of s, each of which
must point at a .pack file or a directory containing
.pack files.

—batch
Run the script in batch mode. This mostly means that
defaults will be provided for interactive inputs. Some
defaults are, however, not identical to the interctive
defaults, e.g., “Last chance ? do you want to con­
tinue” questions will be ansered “yes”, rather than
“no”.

—interactive
Reverse of —batch. This is the default.

-file
Read commands from . Use ’
’ to read com­
mands from STDIN. When this option is used the command
on the command line is ignored.

—help
Get this help information.

—[no]warnings
Generate, or suppress, certain warning messages.

—[no]configcheck
Perform, or skip, a check of package configuration
consistency on interactive startup. This checks that
packages were built with a consistent set of configu­
ration switches and host machine architectures. The
default is to perform this check. Note that this
check is skipped on batch invocations of awb-shell.

See also the awb-shell commands “show configuration”
and “verify configuration”. When this check is
enabled, a “verify configuration all” command is per­
formed on startup.

[—] command…
An awb-shell command. A summary of awb-shell commands
can be obtained by invoking the ‘help’ command, e.g.,
‘awb-shell help’. Information on the various objects
supported can be obtained by invoking the command
‘help abstractions’;

Note that for awb-shell commands with options them­
selves the “—” in front of the command is not
optional.




Commands:

set workspace – set default workspace

new workspace – create new workspace
clone workspace – clone the current workspace to
[—link] – create hard links to files in current workspace

rehash workspace – rehash workspace
edit workspace – edit workspace
show workspace – show info about workspace

list bundles – list all bundles

checkout bundle [/] – checkout a bundle of packages from their repositories
[—user=] – do checkout as
[—nobuild] – do not build package
[—noaddpath] – do not add package to search path
[—golden] – check out the recent golden version

use bundle – copy a bundle of packages into workspace
[—nobuild] – do not build package
[—noaddpath] – do not add package to search path
[—golden] – check out the recent golden version

update bundle [/] – update a bundle of packages in a workspace
[—nobuild] – do not rebuild updated packages

show bundle – show the packages in a bundle

new bundle [/] – create a new bundle
[—model=[|.] | – from package dependencies of or default model,
-experiment=/ | – or models in experiments///.models,
—packages= | – or comma-separated package list ,
] – or from all packages in the current workspace (default).
[
-head] – specify HEAD or branch name instead of current revision
[—type=[release|baseline]] – bundle type (defaults to “release”)
[—status=[Unknown|Success|Failure]] – status, for baseline bundles (defaults to “Unknown”)
[—file= | – write bundle information to file ,
—install | – or to /etc/asim/bundles//.,
] – or to default file ~/.asim/bundles//.

awb – invoke awb on current workspace

new repository – create a new repository
show repository – show characteristics of a repository

rehash repositories – rehash the repository list
list repositories – list repositories

rehash packages – rehash the package list
list packages – list checked out packages
baseline packages – show version information of all workspace packages
[—csn] – use CSN information from admin/packages instead of
querying revision control system

set package – set default package
unset package – leave default package undefined

new package – create a new package

checkout package [/] – checkout a package
[—user=] – do checkout as
[—nobuild] – do not build package
[—noaddpath] – do not add package to search path

use package [/] – copy a package into workspace
[—nobuild] – do not build package
[—noaddpath] – do not add package to search path

add package – prepend package at directory to
search path
delete package [all|…] – delete a checked out package

show package [all|…] – show info about package

regtest package [] – run regression test on package (obsolete)

update package [all|…] – update a package
[—nobuild] – prevent ./configure and build of package

commit package [all|…] – commit a package
[—nodependent] – prevent commit of dependent packages
[—commitlog=] – Use in batch mode to supply commit comments

tag package [] label – tag current package revision with symbolic label
release package [] version – create a new release of a package
branch package [] branch – create a branch named “branch”
merge package [] [CSN] – merge a branch with the
main trunk (HEAD/CSN)

lock package [] – lock a package
unlock package [] – unlock a package

cd package [] – cd to root directory of package
shell package [] – start a shell in the package
directory
cvs package [] – issue cvs command on a package

svn package [] – issue svn command on a package

build package [all| …] – configure and make package(s)

configure package [all| …] – configure package(s)

make package [all| …] – build package(s)

install package [all| …] – install package(s)
[—source] – install sharable source copy of package(s)

clean package [all| …] – clean up object files in package(s)

status package [all| …] – print status of package(s) against repository
[—verbose] – print status of every file


show configuration [all| …] – show build tree configuration info for package
[—verbose] – include a more extensive list of output vars

verify configuration [all| …] – verify compatibility of package configurations
[—exhaustive] – check the full list of ‘configure’ output variables


list regressions – list existing regressions

run regression [default|all|…] – run regression on packages
[] switches to send to regression launcher

verify regression – verify regression results

clean regression – cleanup after regression

delete regression – delete the latest regression

rehash locks – rehash lock list
list locks – list of all locks

set lock – set default lock
unset lock – leave default lock undefined

new lock [] – create a new lock
delete lock [] – destroy a lock
lock lock [] – acquire a lock
unlock lock [] – release a lock

set model – set default model
unset model – leave default model undefined

new model – create a new model
edit model [] – edit a model configuartion

clean model [] – clean a model
[—builddir ] – directory for model build

nuke model [] – totally cleans a model
[—builddir ] – directory for model build

configure model [] – configure a model
[—builddir ] – directory for model build
[—[no]persist] – hard links [soft links] from build area to source files

ncfg model [] – nuke & configure a model
[—builddir ] – directory for model build
[—[no]persist] – hard links [soft links] from build area to source files

build model [] – build a model
[—builddir ] – directory for model build
[—buildopt ] – make options for build

show model [] – show a model configuration

cd model [] – cd to build directory of model

set benchmark – set default benchmark

setup benchmark [] – setup benchmark on a model
[—model ] – model to setup benchmark for
[—rundir ] – directory for benchmark run

run benchmark [] – run benchmark on a model
[—model ] – model to run benchmark
[—rundir ] – directory for benchmark run
[—runopt ] – options for benchmark run

list models – list the models
rehash models – rehash the model list

list modules – list the modules
rehash modules – rehash the module list

set module – set default module
unset module – leave default module undefined

new module – create a new module configuration
edit module [] – edit a module configuration
show module [] – show a module configuration

rehash – rehash all relevant lists
status – show current state

! – execute a shell command
cd – cd to directory
pwd – print current directory

help – display this message
help abstractions – display info on the asim
abstractions
help code – display help on the perl source
code itself
help examples – display an asim-shell cookbook
help quickstart – display info on how to get started

exit – exit shell
quit – exit shell



where,
is a directory containing an asim workspace

is a repository name from a .pack file
is a version or branch tag

is the name of a package (run ‘list packages’ for choices)

is a model .apm file
default: $AWB_MODEL or last model configured/built

is a benchmark .cfg file
default: $AWB_BENCHARK or last benchmark setup/run

is a module .awb filename

Note command completion and editing exists at the command prompt
and for most of the user input prompts. You may need to install
the perl module Term::Readline::GNU for this to work…

The argument for package commands has the following syntax and
semantics:

HEAD – the latest revision on the main trunk
– the latest revision on the named branch
CSN-- – a specific revision on the main trunk
CSN-- – a specific revision on a branch
– a specific revision on the main trunk (SVN only)
: – a specific revision on a branch (SVN only)



Environment:

ASIMSHELLOPT
Contains additional command line switches, which are effectively
prepended at the beginning of the command line.

AWBLOCAL
If AWBLOCAL is set, it is used to set the default workspace.
AWBLOCAL must point to the directory that contains the awb.config file
for the workspace. Using AWBLOCAL explictly is discouranged in favor
of simply CDing into a workspace.

AWB_MODEL
If AWB_MODEL is set, it is used to set the default model.
AWB_MODEL must point to a model configuration file (*.apm).

AWB_BENCHMARK
If AWB_BENCHMARK is set , it is used to set the default benchmark.
AWB_BENCHMARK must point to a benchmark configuration file (*.cfg).

ASIMEDITOR or EDITOR
The ASIMEDITOR or EDITOR environment variable is used when a file needs
to be edited, e.g. the changes file during a commit procedure. If neither
is defined emacs and gvim are tried.

ASIMTMPDIR or TMPDIR
Various procedures in asim-shell need to create temporary files.
these variables point to the directory where these temporary files
will be created. If neither is defined /tmp will be used.

PAGER
If PAGER is set, its value us used as the name of the program to
page through text output one screenful at a time. If it is not defined,
“more” is used for paging.

SHELL
The SHELL environment variable is used as the program to start
for the “shell package” command.

CVS_RSH
In order to start cvs commands on packages / repositories, CVS_RSH
is used to select the correct remote connection method for cvs. If
this variable is not set, asim-shell set a default of “ssh2” before
any cvs commands are issued.


Files:

~/.asim/asimrc
User-specific configuration file

/etc/asim/asimrc
Global configuration file

~/.asim/repositories.d/*.pack
User-specific description of repositories (optional)

~/.asim/asim.pack
More user-specific description of repositories (deprecated/optional)

/etc/asim/repositories.d/*.pack
Global descriptions of repositories.

/etc/asim/asim.pack
More global descriptions of repositories (legacy).




Examples:

% awb-shell help quickstart

% awb-shell
awb> set model pm/Arana/arana_aint_dev.apm
awb> clean model
awb> configure model
awb> build model
awb> run model bm/Micro/maxipc.cfg
awb> quit

% awb-shell —package=arana commit package

% awb-shell help

% awb-shell help code




The source for this information is internal documentation of awb-shell, which is likely to be more up-to-date than this page.

Clone this wiki locally