#!/bin/bash export ROOT=$PWD full_defined="FALSE" arch_defined="FALSE" job=1 CPP_KEY="CPP_NONE" ICOSA_LIB="" while (($# > 0)) do case $1 in "-h") cat <current_args ROOT="$ROOT" arch="$arch" job="$job" EOF echo "Setup saved in file current_args :" cat current_args # create separate build dirs sharing the same src/ and tools/ subdirs to save disk and time BUILD=$ROOT/DYNAMICO_serial echo "Creating build directory $BUILD" rm -rf $BUILD mkdir -p $BUILD cd $ROOT/DYNAMICO for NAME in arch build compile make_icosa src bld.cfg clean doc tools ; do ln -s $ROOT/DYNAMICO/$NAME $BUILD/ done for NAME in mpi mpi_omp ; do echo "Creating build directory $ROOT/DYNAMICO_$NAME" rm -rf $ROOT/DYNAMICO_$NAME cp -pr $BUILD $ROOT/DYNAMICO_$NAME done echo "You may now run ./build.sh" else echo "Please define a target architecture" exit 1 fi