ray [SRC] [CPP] [JOB] [SCAN]
TOOLS / SCRIPTS



   1 | #!/bin/sh
   2 | 
   3 | echo " RAY v1.0"
   4 | echo " Description : Tool to calculate the radiative intensity at the"
   5 | echo "               exit of a gaz wall"
   6 | 
   7 | #
   8 | # Path definitions
   9 | #
  10 | 
  11 | LOCALDIR=`pwd`
  12 | CHOICESD=$DOMHOME/TOOLS/CHOICES
  13 | PERSODIR=$DOMHOME/TOOLS/INCLUDE
  14 | TOOLDIR=$DOMHOME/TOOLS/RAY
  15 | 
  16 | #
  17 | # Detect if all files are ready for run
  18 | #
  19 | 
  20 | ECHOICES=0
  21 | EPERSO=0
  22 | DORUN=1
  23 | 
  24 | if [ ! -d SPECTRAL ]
  25 | then
  26 |   ln -s $DOMHOME/WORK/DATA/SPECTRAL ./SPECTRAL
  27 | fi
  28 | 
  29 | if [ -f 'ray.choices' ]
  30 | then
  31 |   ECHOICES=1
  32 | fi
  33 | 
  34 | if [ -f 'profile.inc' ]
  35 | then
  36 |   EPERSO=1
  37 | fi
  38 | 
  39 | if [ $ECHOICES -eq 1 ]
  40 | then
  41 |   echo " Choices file found"
  42 | else
  43 |   cp $CHOICESD/ray.choices .
  44 |   echo " -- No ray.choices file found, copying default file."
  45 |   echo "    Fill the choices file and run again ray"
  46 |   DORUN=0
  47 | fi
  48 | 
  49 | if [ $EPERSO -eq 1 ]
  50 | then
  51 |   echo " profile.inc profile found"
  52 | else
  53 |   cp $PERSODIR/profile.inc ./profile.inc
  54 |   echo " -- No profile.inc file found, copying default file."
  55 |   echo "    Fill in the desired profile and run again ray"
  56 |   DORUN=0
  57 | fi
  58 | 
  59 | if [ $DORUN -eq 1 ]
  60 | then
  61 |   mv ./profile.inc ./profile.inc_bup
  62 |   cp $PERSODIR/profile.inc $PERSODIR/profile.inc_old
  63 |   cp ./profile.inc_bup $PERSODIR/profile.inc_new
  64 |   cp ./profile.inc_bup $PERSODIR/profile.inc
  65 | 
  66 |   make -f $TOOLDIR/Makefile all
  67 |   mv ./profile.inc_bup ./profile.inc
  68 |   $DOMHOME/HOSTS/$DOM_HOSTTYPE/ray_$DOM_VERSION.e_$DOM_HOSTTYPE
  69 |   rm SPECTRAL
  70 | fi