Notify.pm: export GIROCCO_BASEDIR for girocco.notifyhook
When running a custom notify hook (either via a direct girocco.notifyhook
project-specific setting or the global $Girocco::Config::default_notifyhook
setting), the hook may want to make use of some of the Girocco facilities
and/or configuration values while going about its business.
Standard Girocco hooks/scripts/etc. go about this by using the value
of $Girocco::Config::basedir that was substituted into them during the
install process.
Provide that same value via the GIROCCO_BASEDIR environment variable so
the custom notify hook can do the same if it so desires.
Shell scripts can then do either this:
. "$GIROCCO_BASEDIR/shlib.sh"
or to just get the config settings this:
. "$GIROCCO_BASEDIR/shlib_vars.sh"
Perl scripts can do this:
use lib $ENV{GIROCCO_BASEDIR";
and then "use" the appropriate module(s) such as "Girocco::Config".
Other languages can easily parse the format of the shlib_vars.sh
file to extract the values as it's a simple line-oriented name=value
format where value either contains no whitespace or double-quotes
at all or immediately starts with a double-quote using exactly 4
possible escapes ( \\ \` \$ \" ) before ending with another
double-quote (embedded newlines ARE allowed in the double-quoted
value case).
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>