Skip to content

Commit

Permalink
use input folders as hook arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Feb 19, 2013
1 parent 42bc174 commit 38cc51b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README
Expand Up @@ -66,6 +66,15 @@ Hooks are scripts which are run at certain points of the export
procedure. Hooks have to be executable and have to be placed in a hook
folder below the input directory.

All hooks will be run with a comma seperated list of input folders as argument.

ex.:

..................
inputfolder1/hooks/pre inputfolder1,inputfolder2
..................


==== pre

The 'pre' hook is run before the export.
Expand Down
4 changes: 2 additions & 2 deletions lib/Monitoring/TT.pm
Expand Up @@ -81,7 +81,7 @@ sub run {
exit 1;
}
}
$self->_run_hook('pre');
$self->_run_hook('pre', join(',', @{$self->{'in'}}));

# die if output directory already exists
if(-e $self->{'out'} and !$self->{'opt'}->{'force'}) {
Expand All @@ -100,7 +100,7 @@ sub run {
$self->_copy_static_files();
$self->_build_dynamic_config();
$self->_print_stats();
$self->_run_hook('post');
$self->_run_hook('post', join(',', @{$self->{'in'}}));
info('done');
return 0;
}
Expand Down

0 comments on commit 38cc51b

Please sign in to comment.