Script Index


/var/lib/sorcery/modules/libgrimoire

These functions can be used in the PRE_BUILD, BUILD, POST_BUILD and POST_INSTALL sections of spells. Original version Copyright 2001 by Kyle Sallee Additions/Corrections Copyright 2002 by the Source Mage Team

Libgrimoire

Synopsis

Set of functions containing the spell writing API.


function real_mk_source_dir()

Parameters:

Type

API

Description

Creates a tmpfs filesystem. By default, the size is 1GB. The caller may optionally supply a size argument.

Example1: Create a 2GB mount at $SOURCE_DIRECTORY
mk_source_dir $SOURCE_DIRECTORY 2g
Example2: Create a mount at /tmp/newdir, defaults to 2GB size
mk_source_dir /tmp/newdir


function real_rm_source_dir()

Parameters:

Globals

SOURCE_DIRECTORY

Description

Removes the given directory or SOURCE_DIRECTORY if no argument is given.


function make()

Parameters:

Description

Override calls to the make program. Used to add custom arguments and handle failures when using multiple jobs.


function install_desktop_files()

Parameters:

Stdout

file name

Description

Install files in a spells "desktop" subdirectory for .desktop


function real_installed_version()

Parameters:

Type

API

Description

Returns the current version of the given spell


function private_installed_version()

Parameters:

Type

API

Description

Returns the current version of the given spell Doesnt do sanity check for spell_ok, used internally for speed. Behavior is undefined is spell is not installed.


function real_conflicts()

Parameters:

Type

API

Description

If the default answer is anything other than 'y' then 'n' is assumed. returns the given spellname if it is installed


function warn_rejected()

Parameters:

Stdout

Warning messages.

Description

Provides a neatly formatted rejection dialog for the various rejected spells that might require user warnings. See ask_continue_with_rejected for second part of this function.


function ask_continue_with_rejected()

Parameters:

Stdin

Answer ;-)

Stdout

Question

Description

Part two of the warn_rejected funtion, ask if user wants to continue anyway. (defaults to NO), unless running in UNATTEND_SAFE mode.