Subversion Repositories DevTools

Rev

Rev 379 | Rev 399 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 379 Rev 381
Line 606... Line 606...
606
    {
606
    {
607
        $config_file = create_config_spec ('config_spec.txt');
607
        $config_file = create_config_spec ('config_spec.txt');
608
    }
608
    }
609
 
609
 
610
    Message( "Populating the view");
610
    Message( "Populating the view");
611
    ClearTool( 'setcs', '-tag', $VIEWTAG, $config_file );
611
    my $rv = ClearTool( 'setcs', '-tag', $VIEWTAG, $config_file );
612
}
612
}
613
 
613
 
614
#   Place a tag-file in the user-specified source path
614
#   Place a tag-file in the user-specified source path
615
#   This will be used by the build-tool to locate the 'source-path' of the
615
#   This will be used by the build-tool to locate the 'source-path' of the
616
#   view, primarily for determining metrics.
616
#   view, primarily for determining metrics.
Line 635... Line 635...
635
#       Eliminate 'vobs' subdirectory and move items up
635
#       Eliminate 'vobs' subdirectory and move items up
636
#
636
#
637
if ( $opt_extract_files )
637
if ( $opt_extract_files )
638
{
638
{
639
 
639
 
-
 
640
    #
-
 
641
    #   Remove view tag - will be left with the view
-
 
642
    #
640
    chdir ( $user_cwd );
643
    chdir ( $user_cwd );
641
    ClearCmd ( 'rmview', '-force', '-tag', $VIEWTAG );
644
    ClearCmd ( 'rmview', '-force', '-tag', $VIEWTAG );
642
 
645
 
643
    #
646
    #
644
    #   Remove view specific files
647
    #   Remove view specific files
645
    #
648
    #
646
    chdir ( $VIEWDIR );
649
    chdir ( $VIEWDIR ) || Error ("Cannot cd to $VIEWDIR");
647
    RmDirTree( 'local_dpkg_archive' );
650
    RmDirTree( 'local_dpkg_archive' );
648
    RmDirTree( '.view.dat' );
651
    RmDirTree( '.view.dat' );
649
    foreach my $file ( glob ('update.*.updt') )
652
    foreach my $file ( glob ('update.*.updt') )
650
    {
653
    {
651
        RmDirTree( $file );
654
        RmDirTree( $file );
652
    }
655
    }
653
 
656
 
654
    #
657
    #
-
 
658
    #   Ensure that the VOB root was extracted
-
 
659
    #
-
 
660
    Error ("Root directory not found: $VIEWDIR$ROOT_VOB")
-
 
661
        unless( -d $VIEWDIR . $ROOT_VOB );
-
 
662
    
-
 
663
    #
655
    #   If Unix based view, then get rid of the VOBS directory
664
    #   If Unix based view, then get rid of the VOBS directory
656
    #
665
    #
657
    if ( $UNIX )
666
    if ( $UNIX )
658
    {
667
    {
659
        foreach my $file ( glob ('vobs/*') )
668
        foreach my $file ( glob ('vobs/*') )
660
        {
669
        {
661
            my $target = $file;
670
            my $target = $file;
662
            $target =~ s~^vobs/~~;
671
            $target =~ s~^vobs/~~;
663
            rename $file, $target || Error ("Renameing $file. $!");
672
            rename $file, $target || Error ("Renaming $file. $!");
664
        }
673
        }
665
 
674
 
666
        rmdir 'vobs' || Error ("Removing vobs directory");
675
        rmdir 'vobs' || Error ("Removing vobs directory from: $VIEWDIR");
667
    }
676
    }
668
 
677
 
669
    Message DisplayPath("View files in: $VIEWDIR, Files: $load_count" );
678
    Message DisplayPath("View files in: $VIEWDIR, Files: $load_count" );
670
    exit (0);
679
    exit (0);
671
}
680
}