Subversion Repositories DevTools

Rev

Rev 4695 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4695 Rev 4696
Line 718... Line 718...
718
#
718
#
719
#                   Options:
719
#                   Options:
720
#                       --FromPackage
720
#                       --FromPackage
721
#                       --SoftLink=xxxx
721
#                       --SoftLink=xxxx
722
#                       --LinkFile=xxxx
722
#                       --LinkFile=xxxx
-
 
723
#                       --IncludeDebug
723
#
724
#
724
#
725
#
725
# Returns         : Full path to destination file
726
# Returns         : Full path to destination file
726
#
727
#
727
sub CopyBinFile
728
sub CopyBinFile
Line 786... Line 787...
786
#                   Options:
787
#                   Options:
787
#                       --FromPackage
788
#                       --FromPackage
788
#                       --SoftLink=xxxx
789
#                       --SoftLink=xxxx
789
#                       --LinkFile=xxxx
790
#                       --LinkFile=xxxx
790
#                       --ConfigFile
791
#                       --ConfigFile
-
 
792
#                       --IncludeDebug
791
#
793
#
792
# Returns         : 
794
# Returns         : 
793
#
795
#
794
sub CopyFileCommon
796
sub CopyFileCommon
795
{
797
{
796
    my $from_package = 0;
798
    my $from_package = 0;
797
    my $isa_linkfile = 0;
799
    my $isa_linkfile = 0;
798
    my $isa_configFile = 0;
800
    my $isa_configFile = 0;
-
 
801
    my $include_debug = 0;
799
    my @llist;
802
    my @llist;
800
    my @args;
803
    my @args;
801
 
804
 
802
    #
805
    #
803
    #   Parse options
806
    #   Parse options
Line 811... Line 814...
811
            $isa_linkfile = 1;
814
            $isa_linkfile = 1;
812
 
815
 
813
        } elsif ( m/^--ConfFile/i ) {
816
        } elsif ( m/^--ConfFile/i ) {
814
            $isa_configFile = 1;
817
            $isa_configFile = 1;
815
 
818
 
-
 
819
        } elsif ( m/^--IncludeDebug/i ) {
-
 
820
            $include_debug = 1;
-
 
821
 
816
        } elsif ( m/^--SoftLink=(.+)/ ) {
822
        } elsif ( m/^--SoftLink=(.+)/ ) {
817
            push @llist, $1;
823
            push @llist, $1;
818
 
824
 
819
        } elsif ( m/^--/ ) {
825
        } elsif ( m/^--/ ) {
820
            Error ("FileCopy: Unknown option: $_");
826
            Error ("FileCopy: Unknown option: $_");
Line 856... Line 862...
856
        else
862
        else
857
        {
863
        {
858
            mkpath( "$DebianWorkDir$dst_dir", 0, 0775);
864
            mkpath( "$DebianWorkDir$dst_dir", 0, 0775);
859
            unlink ("$DebianWorkDir$dst_file");
865
            unlink ("$DebianWorkDir$dst_file");
860
            System ('cp','-f', $src, "$DebianWorkDir$dst_file" );
866
            System ('cp','-f', $src, "$DebianWorkDir$dst_file" );
-
 
867
            
-
 
868
            if ( $include_debug )
-
 
869
            {
-
 
870
                my $dbg_src = "$src.dbg";
-
 
871
                my $dbg_dst_file = "$dst_file.dbg";
-
 
872
                if ( -e "$src.dbg" )
-
 
873
                {
-
 
874
                    Verbose ("CopyFile: Copy debug symbols $dbg_src, $dbg_dst_file" );
-
 
875
                    unlink ("$DebianWorkDir$dbg_dst_file");
-
 
876
                    System ('cp','-f', $dbg_src, "$DebianWorkDir$dbg_dst_file" );
-
 
877
                }
-
 
878
                else
-
 
879
                {
-
 
880
                    Error ("Unable to load debug file $dbg_src" );
-
 
881
                }
-
 
882
            }
861
 
883
 
862
            foreach my $lname ( @llist )
884
            foreach my $lname ( @llist )
863
            {
885
            {
864
                $lname = $dst_dir . '/' . $lname unless ( $lname =~ m ~^/~ );
886
                $lname = $dst_dir . '/' . $lname unless ( $lname =~ m ~^/~ );
865
                MakeSymLink( $dst_file ,$lname);
887
                MakeSymLink( $dst_file ,$lname);