Shells


shell (command), shellDialogue (command)
shell and shellDialogue let you execute standard shell commands as part of a Pacman installation. In general, you should use Pacman syntax instead of shell commands whenever possible for several reasons: Several command line switches in -v help and -ask help relate to shell commands. An installer can, for instance, use -ask shell and Pacman will stop and ask permission before executing any of these shell commands. From the Pacman perspective, if a shell command returns no exit code, it is considered to have successfully executed. The shell atom sends sysout to a log file, so if you are executing a script that interacts with the installer, you should use shellDialogue.

shellOutputContains (command, text)
shellOutputContains executes the shell command command and requires that the output contains text.

shellOutputEQ (command, text), shellOutputLE (command, text), shellOutputLT (command, text), shellOutputGE (command, text), shellOutputGT (command, text)
shellOutputEQ,LE,LT,GE,GT let's you compare the output of a shell command to a provided string. This is convenient for requiring versions of natively installed software. For example, if you want to require GNU Wget at least version 1.9, you can do
shellOutputGE('wget -v','GNU Wget 1.9')
this requires both that wget is available and that the start of the resulting output matches or exceeds the provided string.

uninstallShell (command)
uninstallShell let's you specify shell commands which are only executed when a package is uninstalled. This is typically useful for cleaning up the result of other shell commands.

setup (command)
Setup let's you put code directly into the setup.csh(sh) scripts that Pacman generates when you use -setup or -get. command is put directly into the scripts with the following modifications A typical use is
setup('source $MYPACKAGE_LOCATION/mySetup.SHELL')
which causes mySetup.csh and mySetup.sh to be sourced from the standard Pacman generated setup scripts.


Pacman Headquarters