echo "Setup Darwin ...";
#site Web :
#ln -sf /Library/WebServer/Documents_laurentgarnier /Library/WebServer/Documents

setenv PATH ${PATH}:/usr/local/bin

alias 2HEPVis "cd ~/Work/HEPVis/v6r5"
alias 2POVAMA "cd ~/Work/POVAMA"

setenv MySVN_PATH "~/Work/To_SVN"
setenv MyCVS_PATH "~/Work/To_CVS"
setenv TRAC_PATH "/Users/Shared/Trac"
setenv SVN_PATH "/Users/Shared/SVN"
setenv TMP_PATH "~/Work/tmp"
setenv OPENROOT "~/Work/OpenScientist/v12r1"
alias  OPENSCIENTIST "setenv CMTCONFIG Darwin;setenv CMTPATH ${OPENROOT};"
#setenv PATH ~/Work/OpenScientist/v12r1/CMT/v1r16/Darwin:/sw/bin:usr/local/bin:${PATH}
#PATH=/usr/local/gcc/3.3.2/bin:/usr/bin:/sw/bin:/sw/qt/bin:/bin:/sbin:/usr/bin:/usr/sbin:${OPENROOT}/CMT/v1r16/Darwin

#setenv QTDIR /Developer/qt
#setenv PATH ${QTDIR}/bin:${PATH}
#setenv MANPATH ${QTDIR}/doc/man:$MANPATH

if ($?DYLD_LIBRARY_PATH) then
#  setenv DYLD_LIBRARY_PATH ${QTDIR}/lib:/sw/lib:/sw/lib/InventorDebug:${DYLD_LIBRARY_PATH}
else
#  setenv DYLD_LIBRARY_PATH ${QTDIR}/lib:/sw/lib:/sw/lib/InventorDebug
endif

#alias CMT  source ~/Work/OpenScientist/v12r1/CMT/v1r16/mgr/setup.csh
alias CMT  source ~/Work/OpenScientist/v13r0/CMT/v1r14p20031120/mgr/setup.csh


alias xp "2HEPVis; cd cmt; xemacs ../source/SoPlotter.cxx ../source/SoAxis.cxx ../source/SoAxisGroup.cxx ../application/Axis.cxx ../application/plotter.cxx; xemacs ../include/HEPVis/nodekits/SoPlotter.h  ../include/HEPVis/nodekits/SoAxis.h  ../include/HEPVis/nodekits/SoAxisGroup.h&; setLD"
alias xh "2HEPVis;cd cmt; xemacs ../source/SbHatch.cxx ../source/SoHatching.cxx  ../applications/HatchBox.cxx  ../include/HEPVis/nodes/SoHatching.h ../include/HEPVis/SbHatch.h &; setLD"
alias xpov "2POVAMA;cd cmt; xemacs ../source/SoPovama.cpp ../applications/PovamaAtlas.cpp ../SoPovama/SoPovama.h&; setLD "
alias wh "2HEPVis;cd cmt;CMT;cmt config;source setup.csh"
alias wp "2POVAMA;cd cmt;CMT;cmt config;source setup.csh"
alias plot " wh;xp"
alias hatch " wh;xh"
alias pov " wp;xpov"
alias X11 "open /Applications/Utilities/X11.app"

alias SVN_configurationGet "cd ${MySVN_PATH}/LAL/configuration;svn update;cp darwin.csh auger5_rh93_gcc332.csh lx1_rh72_gcc332.csh ${HOME}/.; cp dot.tcshrc ${HOME}/.tcshrc;tcsh"

alias SVN_configurationPut "cd ${MySVN_PATH}/LAL/configuration;cp ${HOME}/darwin.csh ${HOME}/auger5_rh93_gcc332.csh ${HOME}/lx1_rh72_gcc332.csh .;cp ${HOME}/.tcshrc dot.tcshrc;svn status -u;svn diff; svn commit --message ''"
alias ldd "otool -L"
alias mallocDebug "open /Developer/Applications/Performance\ Tools/MallocDebug.app/"

alias svnStatus "svn status -u> ${TMP_PATH}/svnStatusFile;grep '^[M|C|U] ' ${TMP_PATH}/svnStatusFile > ${TMP_PATH}/modifsSVN;echo '-------------------------------------------------';echo 'svn status -u :';echo '-------------------------------------------------';more ${TMP_PATH}/modifsSVN;"

alias SVN_Cp_HEPVis "cd ~/Work/OpenScientist/v13r0/HEPVis/v6r5;rm -rf {$TMP_PATH};mkdir {$TMP_PATH};mkdir {$TMP_PATH}/HEPVis;cp -rf * {$TMP_PATH}/HEPVis/.; cd {$TMP_PATH}/HEPVis; rm -rf Dar*;find . -name '*~' -exec rm {} \;>${TMP_PATH}/rm_tmp; echo 'cleanup files ok'; find . -name 'CVS' -exec rm -rf {} \;>${TMP_PATH}/rm_tmp;echo 'cleanup cvs ok';cp -rf * ${MySVN_PATH}/LAL/OpenScientist/HEPVis/.;cd ${MySVN_PATH}/LAL/OpenScientist/HEPVis;svnStatus;cd ${PWD};"

alias SVN_Cp_dvi2bitmap "cd ~/Work/OpenScientist/v13r0/dvi2bitmap/v1r0132p0;rm -rf {$TMP_PATH};mkdir {$TMP_PATH};mkdir {$TMP_PATH}/dvi2bitmap;cp -rf * {$TMP_PATH}/dvi2bitmap/.; cd {$TMP_PATH}/dvi2bitmap; rm -rf Dar*;find . -name '*~' -exec rm {} \;>${TMP_PATH}/rm_tmp; echo 'cleanup files ok'; find . -name 'CVS' -exec rm -rf {} \;>${TMP_PATH}/rm_tmp;echo 'cleanup cvs ok';cp -rf * ${MySVN_PATH}/LAL/OpenScientist/dvi2bitmap/.;cd ${MySVN_PATH}/LAL/OpenScientist/dvi2bitmap;svnStatus;cd ${PWD};"

alias SVN_Cp_ONX    "cd ~/Work/OpenScientist/v13r0/OnX/v16r0;rm -rf {$TMP_PATH};mkdir {$TMP_PATH};mkdir {$TMP_PATH}/OnX;cp -rf * {$TMP_PATH}/OnX/.; cd {$TMP_PATH}/OnX; rm -rf Dar*;find . -name '*~' -exec rm {} \;>${TMP_PATH}/rm_tmp; echo 'cleanup files ok'; find . -name 'CVS' -exec rm -rf {} \;>${TMP_PATH}/rm_tmp;echo 'cleanup cvs ok';cp -rf * ${MySVN_PATH}/LAL/OpenScientist/OnX/.;cd ${MySVN_PATH}/LAL/OpenScientist/OnX;svnStatus;;cd {$PWD};"

alias SVN_Recover "cd /Users/Shared/ ; sudo svnadmin recover SVN ; sudo chmod -R o+w SVN"

#copy in cron.csh
alias CVS_saveTrac "echo '************* saving Trac **************';rm -rf {$TMP_PATH}/*;trac-admin $TRAC_PATH hotcopy {$TMP_PATH}/trac_backup;tar -czvf {$MyCVS_PATH}/Trac.tgz {$TMP_PATH}/trac_backup;"
alias CVS_saveSVN "echo '************* saving SVN **************';rm -rf {$TMP_PATH}/*;svnadmin hotcopy $SVN_PATH {$TMP_PATH}/svn_backup;tar -czvf {$MyCVS_PATH}/SVN.tgz {$TMP_PATH}/svn_backup;"
alias CVS_saveAll "CVS_saveTrac;CVS_saveSVN"

echo "Setup Darwin ...";

setenv DISPLAY localhost:0.0
