diff options
author | mkanat%bugzilla.org <> | 2009-11-25 04:37:08 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-11-25 04:37:08 +0100 |
commit | 74060782dd67e3e960fac20c759bc025c91caece (patch) | |
tree | 357be5a889e555012298dcb8893b3bdf67214f90 /contrib | |
parent | 0777ee56dd09a2a459074dccda9a8439632ba6e6 (diff) | |
download | bugzilla-74060782dd67e3e960fac20c759bc025c91caece.tar.gz bugzilla-74060782dd67e3e960fac20c759bc025c91caece.tar.xz |
Bug 530960: Put hooks into template/default/hook instead of template/hook
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/extension-convert.pl | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/contrib/extension-convert.pl b/contrib/extension-convert.pl index 1f29db3da..88718cf83 100644 --- a/contrib/extension-convert.pl +++ b/contrib/extension-convert.pl @@ -261,23 +261,22 @@ sub move_template_hooks { my ($dir) = @_; foreach my $lang (glob("$dir/template/*")) { next if !_file_matters($lang); - mkpath("$lang/hook") || die "$lang/hook: $!"; + my $hook_container = "$lang/default/hook"; + mkpath($hook_container) || warn "$hook_container: $!"; # Hooks can be in all sorts of weird places, including # template/default/hook. - foreach my $hooks_container ($lang, "$lang/default/hook") { - foreach my $file (glob("$hooks_container/*")) { - next if !_file_matters($file, 1); - my $dirname = basename($file); - print "Moving $file to $lang/hook/$dirname...\n"; - rename($file, "$lang/hook/$dirname") || die "move failed: $!"; - } + foreach my $file (glob("$lang/*")) { + next if !_file_matters($file, 1); + my $dirname = basename($file); + print "Moving $file to $hook_container/$dirname...\n"; + rename($file, "$hook_container/$dirname") || die "move failed: $!"; } } } sub _file_matters { my ($path, $tmpl) = @_; - my @ignore = qw(default custom CVS hook); + my @ignore = qw(default custom CVS); my $file = basename($path); return 0 if grep(lc($_) eq lc($file), @ignore); # Hidden files |