I was pondering a hook that runs one script at an event (in git) and bemoaning that I had several scripts that I wanted to run for this hook and that there were other hooks that were similar but had different numbers of options and that run-parts had terrible syntax, and thought this would be so much easier in perl, so ...
#!/usr/bin/perl use warnings; use strict; system 'run-parts',$0.'.d', map {-a=>$_} @ARGV;
I'm thinking about removing the use statements to make it faster, but I haven't bothered yet.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: One line dynamic run-parts warpper
by ww (Archbishop) on Dec 16, 2013 at 22:48 UTC | |
by tobyink (Canon) on Dec 17, 2013 at 11:48 UTC | |
Re: One line dynamic run-parts warpper
by Eily (Monsignor) on Dec 17, 2013 at 10:27 UTC |
Back to
Meditations