Many scripts are installed by wigwam-base in ext/bin. If you change these scripts your changes cannot be conveniently committed to CVS, and they will be lost next time the package is upgraded.
But in some projects you may have special needs to change some scripts -- for example, if you need a non-standard configure option for a package, you may override ext/packages/$package-$version.options with packages/$package-$version.options or even packages/$package.options, which you can commit to CVS, and which won't be lost.
In addition to the "non-ext override" rule, there are other "hooks" you can use to run other scripts before or after the script in ext/. This section describes how these overrides work.
Most Wigwam packages install a number of scripts which are generated by the packaging. Such scripts should be installed in ext/bin. Project maintainers may put overriding commands in the non-ext version of the directory.
Note that by default run-configurable only works on sh-scripts because it sources your program from a subshell. To use it on a non-script, run it --non-sh, This will disable .presource from working and the presence of such a file will cause a non-fatal warning.
Scripts which might need customization should be wrapped in a call to ext/bin/run-configurable; which will optionally run a collection of user-hooks. This first option passed to run-configurable which does not begin with a - is the program name to run; this package's version should be in the ext/ directory, but that will be added by run-configurable. This argument will be called $base here. All the arguments after $base are passed verbatim to the program and to any other scripts that are run.
These are the various files run-configurable considers:
order in which to try the scripts; only the first script found is run. The $base.local script should not be committed to CVS.
if it exists, this script is run before the main script with the same arguments.
this script is sourced from the shell before running the main script. Doesn't work if the command is not a sh-script (i.e. if run-configuration was invoked with --non-sh.
if it exists, this script is run after the main script with the same arguments.
So the command,
run-configurable bin/build/weird-script |