- #!/usr/bin/perl
- # this script copies all the items in the user's cdsconfig directory into
- # their branch directory
- sub refresh_config {
- my($branch_name) = @_;
- $home = $ENV{HOME};
- # this directory is where the user's goodies exist
- # CJS
- $cds_config_dir = "$home/cdsconfig";
- # go get the listing of files in th the cdsconfig directory.
- opendir (DIR, $cds_config_dir) || exit(-1);
- local (@filenames) = readdir(DIR);
- closedir(DIR);
- # symbolic link each of the files in this directory to the branch directory
- foreach $f (@filenames) {
- #printf(STDOUT "$f\n");
- if(-f "$cds_config_dir/$f") {
- printf(STDOUT "linking $cds_config_dir/$f to $branch_name/$f - your branch area\n") ;
- # unlink the old link
- unlink("$branch_name/$f");
- system("/bin/ln -s $cds_config_dir/$f $branch_name/$f");
- }# end if
- }# end foreach
- printf(STDOUT "Finished linking files from $cds_config_dir to your branch area.\n") ;
- }# end refresh_config
- # this is necessary at the bottom of every subroutine file
- 1;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 4531 | robert_yu | Util changes: /usr/bin/perl instead of /usr/local/bin/perl Skill changes: get it to work... with schematic, layout, symbols for ic 5.0.33 « |
21 years ago | |
#1 | 4529 | robert_yu | p4 integrate from public/perforce/cdsp4/release/2.2/... | 21 years ago | |
//guest/perforce_software/cdsp4/release/2.2/Utils/refresh_config | |||||
#1 | 2287 | Shiv Sikand | added this | 22 years ago |