source: configs/testing/setup.sh @ 702

Last change on this file since 702 was 702, checked in by dubos, 6 years ago

testing/bash : add dulon_phys and dulat_phys in XML"

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/bash
2
3export ROOT=$PWD
4CMD_LINE="$0 $*"
5
6full_defined="FALSE"
7arch_defined="FALSE"
8job=1
9
10CPP_KEY="CPP_NONE"
11ICOSA_LIB=""
12
13while (($# > 0)) ; do
14  case $1 in
15      "-h") cat <<EOF
16Usage :
17setup [options]
18[-h]                       : help
19 -arch nom_arch            : nom de l\'architecture cible
20 -job N                    : parallel compilation
21 -full                     : full compilation
22extra options will be passed to make_icosa
23EOF
24          exit;;
25      "-arch")
26          arch=$2 ; arch_defined="TRUE"; shift ; shift ;;
27      "-job")
28          job=$2 ; shift ; shift;;
29      "-full")
30          full_defined="TRUE" ; shift ;;
31      *)
32          echo "Unknown options < $* > will be passed to make_icosa"
33          other="$*"
34          break
35  esac
36done
37
38if [[ "$arch_defined" == "TRUE" ]]
39then
40  cat <<EOF >current_args
41# This file was generated by running :
42# $CMD_LINE
43ROOT="$ROOT"
44arch="$arch"
45job="$job"
46other_XIOS="$pther_XIOS"
47other="$other"
48EOF
49
50  echo "Setup saved in file current_args :"
51  cat current_args
52  # create separate build dirs sharing the same src/ and tools/ subdirs to save disk and time
53  BUILD=$ROOT/build_serial
54  echo "Creating build directory $BUILD"
55  rm -rf $BUILD
56  mkdir -p $BUILD
57  cd $ROOT/DYNAMICO
58  for NAME in arch build compile make_icosa src bld.cfg  clean doc tools ; do
59      ln -s $ROOT/DYNAMICO/$NAME $BUILD/
60  done
61  for NAME in mpi mpi_omp ; do
62      echo "Creating build directory $ROOT/build_$NAME"
63      rm -rf $ROOT/build_$NAME
64      cp -pr $BUILD $ROOT/build_$NAME
65  done
66 
67  echo "You may now run bash/build.sh"
68else
69  echo "Please define a target architecture"
70  exit 1
71fi
Note: See TracBrowser for help on using the repository browser.