"removed symlink $step->[1] in ".File::Spec::Unix->catdir(@$directory);
}
-=item execute_commands ( $oplist )
-
-Execute the commands in OPLIST.
-
-=cut
-
-sub execute_commands {
- my $oplist = shift;
-
- our $Scratch_dir; our $Public_dir;
-
- abort "invalid internal operation list"
- unless $oplist->[0][0] eq 'header';
- my $header = $oplist->[0][1];
- my @directory = File::Spec::Unix->splitdir($header->{directory});
-
- foreach my $step (@{$oplist}[1..$#$oplist]) { # skip the header
- if ($step->[0] eq 'install') {
- install_files($header, $step);
- } elsif ($step->[0] eq 'symlink') {
- execute_symlink(\@directory, $step);
- } elsif ($step->[0] eq 'rmsymlink') {
- execute_rmsymlink(\@directory, $step);
- } elsif ($step->[0] eq 'archive') {
- # We now also allow archiving entire directories
- archive_filepair(\@directory, $step->[1]);
- } elsif (IN_TEST_MODE && $step->[0] eq 'no-op') {
- # do nothing
- } else {
- abort "unknown internal operation: $step->[0]";
- }
- }
-}
-
\f
=back
if find_directive_elements($directive, 'filename');
$Phase = 'EX';
- # do the work
- execute_commands($oplist);
+
+ my @directory = File::Spec::Unix->splitdir($op_header->{directory});
+
+ foreach my $step (@{$oplist}[1..$#$oplist]) { # skip the header
+ if ($step->[0] eq 'install') {
+ install_files($op_header, $step);
+ } elsif ($step->[0] eq 'symlink') {
+ execute_symlink(\@directory, $step);
+ } elsif ($step->[0] eq 'rmsymlink') {
+ execute_rmsymlink(\@directory, $step);
+ } elsif ($step->[0] eq 'archive') {
+ # We now also allow archiving entire directories
+ archive_filepair(\@directory, $step->[1]);
+ } elsif (IN_TEST_MODE && $step->[0] eq 'no-op') {
+ # do nothing
+ } else {
+ abort "unknown internal operation: $step->[0]";
+ }
+ }
$complete = 1;
};