Script to cast spells.
Original version Copyright 2001 by Kyle Sallee Some parts copyright 2002 Anders Bruun Olsen et al Other additions/corrections Copyright 2002 by the Source Mage Team
cast is the spell installation utility. It can be called by the user or by sorcery
Help... hmm... I wonder what it does...
Arguments of cast
DEPS_ONLY RECONFIGURE COMPILE FORCE_DOWNLOAD SOURCE_CACHE SILENT SEPARATE INSTALL_QUEUE
cast's arguments
Goes through arguments and prints spells or parameters that are no switches rather.
Look for optional parameter and use default otherwise specify via upvar how much to shift parameters
SPELL
Cast a single spell. When this function is called, all dependencies have been taken care of and we are allowed to cast this.
SPELLS SPELL DEPS_ONLY
User information ("Collating dependencies")
Do dependency resolution. Takes the spells in the $SPELLS variable and resolves them. A superset list is created called $SPELLS_TO_CAST
Spells to be cast
SEPARATE
User interface, y or n
the "Spells are to be cast" message.
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.
SPELL
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
SPELL COMPILE
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)
SUCCESS_LIST FAILED_LIST CHECK_TRIGGERS_SUCCESS
CHECK_TRIGGERS_FAILURE Does report generation.
Spells to cast
CAST_PASS
Starts the passes and sets CAST_PASS accordingly.
User information ("Cleaning up as well as I can...")
That function is being called when the process receives SIGINT. It then calls cleanup.
Used for cleaning up. Deleting some files and $TMP_DIR.
arguments of cast
CAST_PASS
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