Skip to content

Commit f331016

Browse files
authored
Merge pull request #365 from pmienk/script-corrections
Script corrections identified or pointed out by 'otto'.
2 parents b17b254 + c205b17 commit f331016

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

templates/gsl.developer_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ make_jobs()
274274
fi
275275

276276
# Avoid setting -j1 (causes problems on Travis).
277-
if [[ $JOBS > $SEQUENTIAL ]]; then
277+
if [[ $JOBS -gt $SEQUENTIAL ]]; then
278278
make -j"$JOBS" "$@"
279279
else
280280
make "$@"

templates/gsl.install-cmake.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ endfunction
4949
.endmacro # custom_documentation
5050
.
5151
.macro custom_configuration(repository, install)
52-
display_message "BUILD_DIR : $BUILD_DIR"
52+
display_message "BUILD_SRC_DIR : $BUILD_SRC_DIR"
5353
display_message "CUMULATIVE_FILTERED_ARGS : $CUMULATIVE_FILTERED_ARGS"
5454
display_message "CUMULATIVE_FILTERED_ARGS_CMAKE : $CUMULATIVE_FILTERED_ARGS_CMAKE"
5555
.endmacro # custom_configuration
5656
.
5757
.macro custom_script_options()
5858
# Unique script options.
59-
(--build-dir=*) BUILD_DIR="${OPTION#*=}";;
59+
(--build-dir=*) BUILD_SRC_DIR="${OPTION#*=}";;
6060

6161
# Handle ndebug declarations due to disabled argument passthrough
6262
(--enable-ndebug) ENABLE_NDEBUG="yes";;
@@ -67,7 +67,7 @@ endfunction
6767
.macro define_build_variables_custom(repository)
6868
. define my.repo = define_build_variables_custom.repository
6969
. heading2("The default build directory.")
70-
BUILD_DIR="build-$(my.repo.name)"
70+
BUILD_SRC_DIR="build-$(my.repo.name)"
7171

7272
PRESUMED_CI_PROJECT_PATH=\$(pwd)
7373

@@ -279,13 +279,13 @@ make_jobs()
279279
shift 1
280280

281281
VERBOSITY=""
282-
if [[ DISPLAY_VERBOSE ]]; then
282+
if [[ $DISPLAY_VERBOSE ]]; then
283283
VERBOSITY="VERBOSE=1"
284284
fi
285285

286286
SEQUENTIAL=1
287287
# Avoid setting -j1 (causes problems on single threaded systems [TRAVIS]).
288-
if [[ $JOBS > $SEQUENTIAL ]]; then
288+
if [[ $JOBS -gt $SEQUENTIAL ]]; then
289289
make -j"$JOBS" "$@" $VERBOSITY
290290
else
291291
make "$@" $VERBOSITY
@@ -436,10 +436,10 @@ build_all()
436436
display_configuration
437437

438438
if [[ ! ($CI == true) ]]; then
439-
create_directory "$BUILD_DIR"
440-
push_directory "$BUILD_DIR"
439+
create_directory "$BUILD_SRC_DIR"
440+
push_directory "$BUILD_SRC_DIR"
441441
else
442-
push_directory "$BUILD_DIR"
442+
push_directory "$BUILD_SRC_DIR"
443443
fi
444444

445445
initialize_git

templates/gsl.install-cmakepresets.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ declare -A REPO_PRESET
6060
.endmacro # custom_documentation
6161
.
6262
.macro custom_configuration(repository, install)
63-
display_message "BUILD_DIR : $BUILD_DIR"
63+
display_message "BUILD_SRC_DIR : $BUILD_SRC_DIR"
6464
display_message "PRESET_ID : $PRESET_ID"
6565
display_message "CUMULATIVE_FILTERED_ARGS : $CUMULATIVE_FILTERED_ARGS"
6666
display_message "CUMULATIVE_FILTERED_ARGS_CMAKE : $CUMULATIVE_FILTERED_ARGS_CMAKE"
6767
.endmacro # custom_configuration
6868
.
6969
.macro custom_script_options()
7070
# Unique script options.
71-
(--build-dir=*) BUILD_DIR="${OPTION#*=}";;
71+
(--build-dir=*) BUILD_SRC_DIR="${OPTION#*=}";;
7272
(--preset=*) PRESET_ID="${OPTION#*=}";;
7373

7474
# Handle ndebug declarations due to disabled argument passthrough
@@ -80,7 +80,7 @@ declare -A REPO_PRESET
8080
.macro define_build_variables_custom(repository)
8181
. define my.repo = define_build_variables_custom.repository
8282
. heading2("The default build directory.")
83-
BUILD_DIR="build-$(my.repo.name)"
83+
BUILD_SRC_DIR="build-$(my.repo.name)"
8484

8585
PRESUMED_CI_PROJECT_PATH=\$(pwd)
8686

@@ -377,13 +377,13 @@ make_jobs()
377377
shift 1
378378

379379
VERBOSITY=""
380-
if [[ DISPLAY_VERBOSE ]]; then
380+
if [[ $DISPLAY_VERBOSE ]]; then
381381
VERBOSITY="VERBOSE=1"
382382
fi
383383

384384
SEQUENTIAL=1
385385
# Avoid setting -j1 (causes problems on single threaded systems [TRAVIS]).
386-
if [[ $JOBS > $SEQUENTIAL ]]; then
386+
if [[ $JOBS -gt $SEQUENTIAL ]]; then
387387
make -j"$JOBS" "$@" $VERBOSITY
388388
else
389389
make "$@" $VERBOSITY
@@ -538,10 +538,10 @@ build_all()
538538
display_configuration
539539

540540
if [[ ! ($CI == true) ]]; then
541-
create_directory "$BUILD_DIR"
542-
push_directory "$BUILD_DIR"
541+
create_directory "$BUILD_SRC_DIR"
542+
push_directory "$BUILD_SRC_DIR"
543543
else
544-
push_directory "$BUILD_DIR"
544+
push_directory "$BUILD_SRC_DIR"
545545
fi
546546

547547
initialize_git

templates/gsl.install.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ endfunction
4949
.endmacro # custom_documentation
5050
.
5151
.macro custom_configuration(repository, install)
52-
display_message "BUILD_DIR : $BUILD_DIR"
52+
display_message "BUILD_SRC_DIR : $BUILD_SRC_DIR"
5353
.endmacro # custom_configuration
5454
.
5555
.macro custom_script_options()
5656
# Unique script options.
57-
(--build-dir=*) BUILD_DIR="${OPTION#*=}";;
57+
(--build-dir=*) BUILD_SRC_DIR="${OPTION#*=}";;
5858
.endmacro # custom_script_options
5959
.
6060
.macro define_build_variables_custom(repository)
6161
. define my.repo = define_build_variables_custom.repository
6262
. heading2("The default build directory.")
63-
BUILD_DIR="build-$(my.repo.name)"
63+
BUILD_SRC_DIR="build-$(my.repo.name)"
6464

6565
PRESUMED_CI_PROJECT_PATH=\$(pwd)
6666

@@ -127,13 +127,13 @@ make_jobs()
127127
shift 1
128128

129129
VERBOSITY=""
130-
if [[ DISPLAY_VERBOSE ]]; then
130+
if [[ $DISPLAY_VERBOSE ]]; then
131131
VERBOSITY="VERBOSE=1"
132132
fi
133133

134134
SEQUENTIAL=1
135135
# Avoid setting -j1 (causes problems on single threaded systems [TRAVIS]).
136-
if [[ $JOBS > $SEQUENTIAL ]]; then
136+
if [[ $JOBS -gt $SEQUENTIAL ]]; then
137137
make -j"$JOBS" "$@" $VERBOSITY
138138
else
139139
make "$@" $VERBOSITY
@@ -261,10 +261,10 @@ build_all()
261261
display_configuration
262262

263263
if [[ ! ($CI == true) ]]; then
264-
create_directory "$BUILD_DIR"
265-
push_directory "$BUILD_DIR"
264+
create_directory "$BUILD_SRC_DIR"
265+
push_directory "$BUILD_SRC_DIR"
266266
else
267-
push_directory "$BUILD_DIR"
267+
push_directory "$BUILD_SRC_DIR"
268268
fi
269269

270270
initialize_git

0 commit comments

Comments
 (0)