source: configs/testing/setup.sh @ 502

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

configs/testing : towards first working version

  • Property svn:executable set to *
File size: 1.3 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  echo "Creating build directory $BUILD"
49  rm -rf $BUILD
50  mkdir -p $BUILD
51  cd $ROOT/DYNAMICO
52  for NAME in arch build compile make_icosa src bld.cfg  clean doc tools ; do
53      ln -s $ROOT/DYNAMICO/$NAME $BUILD/
54  done
55  for NAME in mpi mpi_omp ; do
56      echo "Creating build directory $ROOT/DYNAMICO_$NAME"
57      rm -rf $ROOT/DYNAMICO_$NAME
58      cp -pr $BUILD $ROOT/DYNAMICO_$NAME
59  done
60 
61  echo "You may now run ./build.sh"
62else
63  echo "Please define a target architecture"
64  exit 1
65fi
Note: See TracBrowser for help on using the repository browser.