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



   1 | #!/bin/sh
   2 | 
   3 | echo " CREATEDOMCASE v1.0"
   4 | echo " Description : this script copies to the local directory the basic "
   5 | echo "               files needed by PRISSMA"
   6 | 
   7 | #
   8 | # Path definitions
   9 | #
  10 | 
  11 | LOCALDIR=`pwd`
  12 | WKDIR=$DOMHOME/WORK
  13 | 
  14 | #
  15 | # Linking DATA
  16 | #
  17 | 
  18 | if [ ! -d QUADRA ]; then
  19 |   cp -r $WKDIR/DATA/QUADRATURE ./QUADRA
  20 | fi
  21 | 
  22 | if [ ! -d SPECTRAL ]; then
  23 |   cp -r $WKDIR/DATA/SPECTRAL ./SPECTRAL
  24 | fi
  25 | 
  26 | #
  27 | # Creating IN/OUT directories
  28 | #
  29 | 
  30 | if [ ! -d 'INFILES' ]
  31 | then
  32 |   mkdir INFILES
  33 |   echo "INFILES directory created !"
  34 | fi
  35 | 
  36 | if [ ! -d 'OUTFILES' ]
  37 | then
  38 |   mkdir OUTFILES
  39 |   echo "OUTFILES directory created !"
  40 | fi
  41 | 
  42 | #
  43 | # Copying input file depending on version
  44 | #
  45 | 
  46 | if [ -f 'prissma.choices'  ]
  47 | then
  48 |   echo " prissma.choices file already present"
  49 | else
  50 |   if [ -f 'domasium.choices'  ]
  51 |   then
  52 |     mv domasium.choices prissma.choices
  53 |   fi
  54 |   cp $WKDIR/INPUT/prissma.choices .
  55 |   echo " prissma.choices not detected, copying default INPUT file. Check it out"
  56 | fi
  57 | 
  58 | echo " The basic files are now present in the directory."