Script Index


/usr/sbin/cast

Script to cast spells.

Synopsis

cast is the spell installation utility. It can be called by the user or by sorcery


function help()

Parameters:

Description

Help... hmm... I wonder what it does...


function process_parameters()

Parameters:

Aguments

Arguments of cast

Globals

DEPS_ONLY RECONFIGURE COMPILE FORCE_DOWNLOAD SOURCE_CACHE SILENT SEPARATE INSTALL_QUEUE


function strip_parameters()

Parameters:

Arguments

cast's arguments

Description

Goes through arguments and prints spells or parameters that are no switches rather.


function get_option()

Parameters:

Description

Look for optional parameter and use default otherwise specify via upvar how much to shift parameters


function cast_spell()

Parameters:

Globals

SPELL

Description

Cast a single spell. When this function is called, all dependencies have been taken care of and we are allowed to cast this.


function pass_one()

Parameters:

Globals

SPELLS SPELL DEPS_ONLY

Stdout

User information ("Collating dependencies")

Description

Do dependency resolution. Takes the spells in the $SPELLS variable and resolves them. A superset list is created called $SPELLS_TO_CAST


function pass_two()

Parameters:

Arguments

Spells to be cast

Globals

SEPARATE

Stdin

User interface, y or n

Stdout

the "Spells are to be cast" message.

Description

Asks whether you want to cast the listed spells or not. Returns if not. Then it starts pass three and four by calling make. Depending on SEPARATE it starts pass three in the background or not.


function pass_three()

Parameters:

Globals

SPELL

Description

Sets SPELL to the spellname and calls summon_spell with spellname as argument. This is equivalent to calling summon, but without the overhead. (Is being called by make) If in screen mode it also execs a tail to the summon window


function pass_four()

Parameters:

Globals

SPELL COMPILE

Description

Sets SPELL to spellname. Calls trigger "pre_cast" If COMPILE is not set, the spell doesn't need an update and it can be resurrected (can_resurrect SPELL) it calls resurrect with SPELL. Otherwise it calls cast_spell. If resurrect or cast_spell returned 0 it calls trigger "cast" (Is being called by make)


function pass_five()

Parameters:

Globals

SUCCESS_LIST FAILED_LIST CHECK_TRIGGERS_SUCCESS

Description

CHECK_TRIGGERS_FAILURE Does report generation.


function pass_zero()

Parameters:

Arguments

Spells to cast

Globals

CAST_PASS

Description

Starts the passes and sets CAST_PASS accordingly.


function int_trap()

Parameters:

STDOUT

User information ("Cleaning up as well as I can...")

Description

That function is being called when the process receives SIGINT. It then calls cleanup.


function cast_cleanup()

Parameters:

Description

Used for cleaning up. Deleting some files and $TMP_DIR.


function main()

Parameters:

Returns:

Arguments

arguments of cast

Globals

CAST_PASS

Description

Starts prameter processing and casts the given spells. The list of given spells is being searched for invalid spells which are then being reported. Then the passes are being started according to CAST_PASS