diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 629cc4de3..cba36c7e3 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -61,7 +61,7 @@ function(add_example) set(FAIRMQ_BIN_DIR ${CMAKE_BINARY_DIR}/fairmq) foreach(script IN LISTS scripts) set(script_file "${script_prefix}-${script}.sh") - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${script_file}.in" "${CMAKE_CURRENT_BINARY_DIR}/${script_file}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${script_file}.in" "${CMAKE_CURRENT_BINARY_DIR}/${script_file}" @ONLY) endforeach() if(ARG_CONFIG) @@ -119,7 +119,7 @@ function(add_example) set(FAIRMQ_BIN_DIR ${CMAKE_INSTALL_PREFIX}/${PROJECT_INSTALL_BINDIR}/fairmq) foreach(script IN LISTS scripts) set(script_file "${script_prefix}-${script}.sh") - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${script_file}.in" "${CMAKE_CURRENT_BINARY_DIR}/${script_file}_install") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${script_file}.in" "${CMAKE_CURRENT_BINARY_DIR}/${script_file}_install" @ONLY) install( PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${script_file}_install" DESTINATION ${PROJECT_INSTALL_BINDIR} diff --git a/examples/region/fairmq-start-ex-region-advanced-external.sh.in b/examples/region/fairmq-start-ex-region-advanced-external.sh.in index f598d03b1..b302edb97 100755 --- a/examples/region/fairmq-start-ex-region-advanced-external.sh.in +++ b/examples/region/fairmq-start-ex-region-advanced-external.sh.in @@ -2,16 +2,8 @@ export FAIRMQ_PATH=@FAIRMQ_BIN_DIR@ -transport="shmem" -msgSize="1000000" - -if [[ $1 =~ ^[a-z]+$ ]]; then - transport=$1 -fi - -if [[ $2 =~ ^[0-9]+$ ]]; then - msgSize=$1 -fi +transport=${1:-shmem} +msgSize=${2:-1000000} SAMPLER="fairmq-ex-region-sampler" SAMPLER+=" --id sampler1" diff --git a/examples/region/fairmq-start-ex-region-advanced.sh.in b/examples/region/fairmq-start-ex-region-advanced.sh.in index a0ad9dea9..2f4ae1b67 100755 --- a/examples/region/fairmq-start-ex-region-advanced.sh.in +++ b/examples/region/fairmq-start-ex-region-advanced.sh.in @@ -2,16 +2,8 @@ export FAIRMQ_PATH=@FAIRMQ_BIN_DIR@ -transport="shmem" -msgSize="1000000" - -if [[ $1 =~ ^[a-z]+$ ]]; then - transport=$1 -fi - -if [[ $2 =~ ^[0-9]+$ ]]; then - msgSize=$1 -fi +transport=${1:-shmem} +msgSize=${2:-1000000} SAMPLER="fairmq-ex-region-sampler" SAMPLER+=" --id sampler1" diff --git a/examples/region/fairmq-start-ex-region.sh.in b/examples/region/fairmq-start-ex-region.sh.in index 673ed73ff..1c065df12 100755 --- a/examples/region/fairmq-start-ex-region.sh.in +++ b/examples/region/fairmq-start-ex-region.sh.in @@ -2,16 +2,8 @@ export FAIRMQ_PATH=@FAIRMQ_BIN_DIR@ -transport="shmem" -msgSize="1000000" - -if [[ $1 =~ ^[a-z]+$ ]]; then - transport=$1 -fi - -if [[ $2 =~ ^[0-9]+$ ]]; then - msgSize=$1 -fi +transport=${1:-shmem} +msgSize=${2:-1000000} SAMPLER="fairmq-ex-region-sampler" SAMPLER+=" --id sampler1"