Commit 5459505b authored by lenz@mysql.com's avatar lenz@mysql.com
Browse files

- added "darwin" to the list of systems that are known to support the

   -p option for cp and the -r option for scp (thank to Paul DuBois for
   the patch)
 - fixed a typo
parent ca08ed52
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -559,15 +559,15 @@ sub copy_files {
	my @cp = ($method);
	# add option to preserve mod time etc of copied files
	# not critical, but nice to have
	push @cp, "-p" if $^O =~ m/^(solaris|linux|freebsd)$/;
	push @cp, "-p" if $^O =~ m/^(solaris|linux|freebsd|darwin)$/;

	# add recursive option for scp
	push @cp, "-r" if $^O =~ /m^(solaris|linux|freebsd)$/ && $method =~ /^scp\b/;
	push @cp, "-r" if $^O =~ /m^(solaris|linux|freebsd|darwin)$/ && $method =~ /^scp\b/;

	my @non_raid = map { "'$_'" } grep { ! m:/\d{2}/[^/]+$: } @$files;

	# add files to copy and the destination directory
+ 	safe_system( @cp, @non_raid, "'$target'" );
	safe_system( @cp, @non_raid, "'$target'" );
	
	foreach my $rd ( @$raid_dirs ) {
	    my @raid = map { "'$_'" } grep { m:$rd/: } @$files;