OpenCores
URL https://opencores.org/ocsvn/socgen/socgen/trunk

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [sys/] [lib.pm] - Diff between revs 117 and 119

Show entire file | Details | Blame | View Log

Rev 117 Rev 119
Line 66... Line 66...
   @output_files =  sort(sort @k);
   @output_files =  sort(sort @k);
   return(@output_files);
   return(@output_files);
   }
   }
 
 
 
 
 
#/*********************************************************************************************/
 
#/                                                                                            */
 
#/                                                                                            */
 
#/                                                                                            */
 
#/                                                                                            */
 
#/                                                                                            */
 
#/                                                                                            */
 
#/*********************************************************************************************/
 
 
 
# recursively map directory information 
 
 
 
sub link_dir {
 
    my $src  = shift;
 
    my $dest = shift;
 
    return unless( -e $src );
 
 
 
    if( -d $src )
 
        {
 
 
 
        mkdir $dest,0755;
 
        my @contents = (  );
 
        opendir( DIR, $src );
 
        while( my $item = readdir( DIR ))
 
            {
 
            next if( $item eq '.' or $item eq '..'   or $item eq '.svn'    );
 
            push( @contents, $item );
 
            }
 
        closedir( DIR );
 
 
 
        # recurse on items in the directory
 
        foreach my $item ( @contents )          { &link_dir("$src/$item", "$dest/$item" );}
 
 
 
 
 
       }
 
       else  {symlink( "${src}", "${dest}") unless( -e "${dest}" ); }
 
}
 
 
 
 
 
 
 
 
 
 
 
 
1;
1;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.