Sophie

Sophie

distrib > Mandriva > 9.2 > i586 > media > contrib > by-pkgid > 1999a7b047259f6bbf9513bce6e6be29 > files > 120

twig-2.7.7-1mdk.noarch.rpm

#!/usr/bin/perl
use Env qw($windir);
if( $windir eq "" ) { print "Using UNIX command line options.\n"; } else { print "Uinsg Windows command line options.\n"; }

	$some_dir = "Output/";
    	opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!";
    	while( $infile = readdir(DIR) )
		{
		if( !grep( /^\./, $infile ) && !grep( /^CVS/, $infile ) )
			{
			print "Copying files from ";
			print $infile;

			if( grep( /^lib/, $infile ) )
				{
				$outfile = "../../lib/strings";
				}
			else
				{
				$outfile = "../../features/" . $infile . "/strings";
				}

			print " to " . $outfile . "\n";

			if( $windir eq "" )
				{
				# Unix
				$cmd = "cp Output/$infile/* $outfile";
				}
			else
				{
				# Windows
				$infile =~ s/\//\\/g;
				$outfile =~ s/\//\\/g;
				$cmd = "copy Output\\$infile\\* $outfile";
				}

			system( $cmd );
			}
		}

    	closedir DIR;