diff -r 85578ba0aa08 -r be14ecca790f bldsystemtools/commonbldutils/BxCopy.pl --- a/bldsystemtools/commonbldutils/BxCopy.pl Fri Apr 16 16:10:01 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -# Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# Script to get Source from Perforce -# -# - -use strict; -use Getopt::Long; - -use FindBin; -use lib "$FindBin::Bin"; -use BxCopy; - - -# Process the commandline -my ($iSource, $iTarget, $iExclude, $iInclude, $iVerbose, $iNoAction) = ProcessCommandLine(); - -# Get list of files -my $iCopyFiles = &BxCopy::FilterDir($iSource,$iExclude,$iInclude); - -# Copy Function -&BxCopy::CopyFiles($iSource, $iTarget, $iCopyFiles, $iVerbose, $iNoAction); - - -# ProcessCommandLine -# -# Inputs -# -# Outputs -# -# Description -# This function processes the commandline - -sub ProcessCommandLine { - my ($iHelp, $iSource, $iTarget, @iExclude, @iInclude, $iVerbose, $iNoAction); - GetOptions('h' => \$iHelp, 's=s' => \$iSource, 't=s' => \$iTarget, 'x=s' => \@iExclude, 'i=s' => \@iInclude, 'v' => \$iVerbose, 'n' => \$iNoAction); - - if (($iHelp) || (!defined $iSource) || (!defined $iTarget)) - { - Usage(); - } elsif (! -d $iSource) { - print "$iSource is not a directory\n"; - Usage(); - } elsif ( -d $iTarget) { - print "$iTarget already exist\n"; - Usage(); - } else { - # Remove any trailing \ or from dirs - $iSource =~ s#[\\\/]$##; - $iTarget =~ s#[\\\/]$##; - # Make sure all the \ are / - $iSource =~ s/\\/\//g; - $iTarget =~ s/\\/\//g; - return($iSource, $iTarget, \@iExclude, \@iInclude, $iVerbose, $iNoAction); - } -} - -# Usage -# -# Output Usage Information. -# - -sub Usage { - print <