#!/usr/bin/perl --   # -*-Perl-*-
#
#   Script to fix symlinks in ATLAS sw releases. It just strips off
#    afs references and puts in your local dir.
#
#  input to this program is a list of files produced by:
#  find . -name \*.so -type l 

#  shank@bu.edu shank Wed Dec  5 08:41:51 2001
#  
# change this for your laptop:
#  location of the release on your local machine:
$basedir = "/home/jpp/MyAtlas/dist";

while (<>){
   chop;
   $file =$_;

   $link = readlink($file);

   $link =~  s/\/afs\/cern.ch\/atlas\/software\/dist/$basedir/;

#   print $file,"\n";
#   print readlink($file),"\n";
#   print "new link: ",$link,"\n";

   system("rm -f $file");
   system("ln -s $link $file");
   
}

