[SM-Discuss] pre_command and post_command scripts

Duane Malcolm d.malcolm at auckland.ac.nz
Fri Jul 26 00:07:39 EDT 2002


Hi,

I have suggested this feature with regard to bug#23.

I suggested having a feature in sourcemage which runs certain scripts if 
they exist. For example, these scripts would be called "pre_cast.sh", 
post_cast.sh", "pre_gaze.sh", "post_gaze.sh", "pre_summon.sh", 
"post_summon.sh", etc..., I think you get the drift. These scripts would 
reside in "/etc/sorcery" or "/etc/sorcery/local". If these scripts exist 
then they would be run before or after the "cast", "gaze" and "summon" 
commands are called.

I would like to use "pre_cast.sh", "pre_summon.sh" and "post_summon.sh" 
script features. The "pre_summon.sh" to turn on my 56k modem and the 
"post_summon.sh" to turn it off. I would like to use the "pre_cast.sh" 
to check the dependencies for the spell I am casting for "lesstif", if 
it depends on "lesstif" I would swap it for "openmotif", my preference.

This feature would allow sourcemage users to add and test personal 
features to sorcery and the grimoire without out worrying about loosing 
their features everytime they "update sorcery".

Also users can post their scripts for others to use.

What do peoples think? Thanks for hearing me out.

Cheers, Duane




More information about the SM-Discuss mailing list