Skip to content
Snippets Groups Projects
Commit ca0f6087 authored by Siddhant Tibrewal's avatar Siddhant Tibrewal
Browse files

added early exit for the convinience build script in case of incompatible getopt option

parent 125cdd05
No related branches found
No related tags found
1 merge request!46Build process for multiple compilers across different machines
......@@ -300,6 +300,12 @@ THREADS=8
DEP_TO_BUILD_INSTALL="all" # can be overriden with any particular library to be built
out=$(getopt -T)
if (( $? != 4 )) && [[ -n $out ]]; then
echo "Unsupported version of getopt (not GNU based version found). Cannot continue"
exit 1
fi
VALID_ARGS=$(getopt -o j:h --long help,build_dir_name:,dependency:,prefix_path: -- "$@") || exit 1
eval set -- "$VALID_ARGS"
while true; do
......@@ -310,16 +316,17 @@ while true; do
;;
--dependency)
DEP_TO_BUILD_INSTALL=$2
echo $DEP_TO_BUILD_INSTALL
echo "Building the following dependency: $DEP_TO_BUILD_INSTALL"
shift 2
;;
--build_dir_name)
BUILD_DIR_NAME=$2
echo "Setting the build directory as: $BUILD_DIR_NAME"
shift 2
;;
--prefix_path)
INSTALL_DIR=$2
echo $INSTALL_DIR
echo "Install prefix path set to: $INSTALL_DIR"
shift 2
;;
? | -h | --help)
......
#!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
while [ $# -gt 0 ]; do
case "$1" in
--yaco-root)
......@@ -22,13 +24,14 @@ export FC="mpif90"
export CXX="mpicxx"
export MPI_LAUNCH="mpiexec"
THREADS=64
THREADS=8
BUILD_PATH=$ABSOLUTE_YACO_ROOT/build/$COMPILER
INSTALL_PATH=$BUILD_PATH/install
# build dependencies for yaco
echo "=== Building yaco dependencies ==="
$ABSOLUTE_YACO_ROOT/scripts/setup/build-dependencies.sh -j $THREADS --dependency all --build_dir_name $COMPILER --prefix_path $INSTALL_PATH
$ABSOLUTE_YACO_ROOT/scripts/setup/build-dependencies.sh -j ${THREADS} --dependency all --build_dir_name ${COMPILER} --prefix_path ${INSTALL_PATH}
# build yaco
echo "=== Building yaco ==="
......
#!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
while [ $# -gt 0 ]; do
case "$1" in
......
#!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
while [ $# -gt 0 ]; do
case "$1" in
......
#!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
while [ $# -gt 0 ]; do
case "$1" in
......
#!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
while [ $# -gt 0 ]; do
case "$1" in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment