#!/bin/bash ### Watch out! This script deletes some files! ### Make sure you have a backup of these files if you modified them previously! ### I assume you use PandaRoot trunk and the folder is also called trunk ### If your PandaRoot source folder has a different name, change the following variable accordingly PANDAPATH="$VMCWORKDIR"/../trunk ### Note ### This script has to be located in the same folder as the other files ### PandaRoot has to be on the same partition as the folder you checked out SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ "$1" != "deleteOldFiles" ]; then echo "Watch out! This script deletes some files!" echo "Make sure you have a backup of these files if you modified them previously!" echo "Check the source code of the script before you run it." echo "If you want to delete the old files, call the script followed by" echo "deleteOldFiles" else ### Check if VMCWORKDIR is set if [ -z "$VMCWORKDIR" ]; then echo "Please set your PandaRoot environment first!" else ### Remove old files and set links to new ones cd "$PANDAPATH"/base/ rm CMakeLists.txt FairLinkDef.h ln "$SCRIPTDIR"/CMakeLists.txt "$PANDAPATH"/base/ ln "$SCRIPTDIR"/FairLinkDef.h "$PANDAPATH"/base/ cd "$PANDAPATH"/base/sim/ rm FairPrimaryGenerator.* FairEvtFilter* FairGenericStack.h FairMCApplication.cxx ### links a few files too many, but that does not really matter ln "$SCRIPTDIR"/* "$PANDAPATH"/base/sim/ cd "$SCRIPTDIR" echo "Hard links set. Go to" echo "base and base/sim to check if the links were set" echo "Easiest method is to run svn status or svn diff on base" fi fi