source: configs/testing/setup.sh @ 501

Last change on this file since 501 was 501, checked in by dubos, 7 years ago

testing : DCMIP31 & DCMIP41

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2
3export ROOT=$PWD
4
5full_defined="FALSE"
6arch_defined="FALSE"
7job=1
8
9CPP_KEY="CPP_NONE"
10ICOSA_LIB=""
11
12while (($# > 0))
13  do
14  case $1 in
15      "-h") cat <<EOF
16Usage :
17setup [options] -arch nom_arch
18[-h]                       : help
19 -arch nom_arch            : nom de l\'architecture cible
20EOF
21          exit;;
22
23      "-arch")
24          arch=$2 ; arch_defined="TRUE"; shift ; shift ;;
25      "-job")
26          job=$2 ; shift ; shift;;
27      "-full")
28          full_defined="TRUE" ; shift ;;
29      *)
30          echo "Unknown argument : $*"
31          echo "Try $0 -h"
32          exit 1
33  esac
34done
35
36if [[ "$arch_defined" == "TRUE" ]]
37then
38  cat <<EOF >current_args
39ROOT="$ROOT"
40arch="$arch"
41job="$job"
42EOF
43
44  echo "Setup saved in file current_args :"
45  cat current_args
46  # create separate build dirs sharing the same src/ and tools/ subdirs to save disk and time
47  BUILD=$ROOT/DYNAMICO_serial
48  cp -pr $ROOT/DYNAMICO $BUILD
49  rm -rf $BUILD/src
50  rm -rf $BUILD/tools
51  ln -sf $ROOT/DYNAMICO/src $BUILD/src
52  ln -sf $ROOT/DYNAMICO/tools $BUILD/tools
53  for NAME in mpi mpi_omp ; do
54      cp -pr $BUILD $ROOT/DYNAMICO_$NAME
55  done
56 
57  echo "You may now run ./build.sh"
58else
59  echo "Please define a target architecture"
60  exit 1
61fi
Note: See TracBrowser for help on using the repository browser.