Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Improved API for query and store config information

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Vladimír Marek <vlmarek AT volny.cz>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Improved API for query and store config information
  • Date: Mon, 22 Mar 2004 12:54:51 +0100

Thank you all for your response, I made the best of them (I hope) and
commited the changes to devel sorcery. The most notable change is that
you have to use 'persistent_load' function on the start of CONFIGURE and
all scripts using $SPELL_CONFIG, and 'persistent_save' at the end. They
handles the asctula serialization of the variables.

Example:

* CONFIGURE:

persistent_load

FQDN=`hostname`
if ! config_query CONFIG "Should I use qmail to decide about your FQDN ?" y
then
config_query_string FQDN "Please give me your FQDN hostname" "$FQDN"
fi
persistent_save

* POST_INSTALL:

persistent_load
if [ "$CONFIG" == "y" ]; then
^^^^^^^
# Variable config 'automagically' set from CONFIGURE

cd "$SOURCE_DIRECTORY/$SPELL-$VERSION"
./config
fi


When no new functions are used, it should not affect cast system in any
way.

Who will be first one to use it ? :)

--
Neuron




Archive powered by MHonArc 2.6.24.

Top of Page