File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -176,16 +176,15 @@ function show_bootstrap_log
176
176
177
177
if [[ " $B2_DONT_BOOTSTRAP " != " 1" ]]; then
178
178
trap show_bootstrap_log ERR
179
- if [ ! -f b2 ]; then
179
+ # Check if b2 already exists. This would (only) happen in a caching scenario. The purpose of caching is to save time by not recompiling everything.
180
+ # The user may clear cache or delete b2 beforehand if they wish to rebuild.
181
+ if [ ! -f b2 ] || ! b2_version_output=$( ./b2 --version) ; then
180
182
${B2_WRAPPER} ./bootstrap.sh
181
183
else
182
- # b2 already exists. This would (only) happen in a caching scenario. The purpose of caching is to save time by not recompiling everything.
183
- # The user may clear cache or delete b2 beforehand if they wish to rebuild.
184
-
185
184
# b2 expects versions to match
186
- engineversion=$( ./b2 --version | tr -s ' ' | cut -d' ' -f2 | cut -d' -' -f1)
187
- enginemajorversion=$( echo ${engineversion} | cut -d' .' -f1)
188
- engineminorversion=$( echo ${engineversion} | cut -d' .' -f2)
185
+ engineversion=$( echo " $b2_version_output " | tr -s ' ' | cut -d' ' -f2 | cut -d' -' -f1)
186
+ enginemajorversion=$( echo " ${engineversion} " | cut -d' .' -f1)
187
+ engineminorversion=$( echo " ${engineversion} " | cut -d' .' -f2)
189
188
coremajorversion=$( grep VERSION_MAJOR tools/build/src/engine/patchlevel.h | tr -s ' ' | cut -d' ' -f 3)
190
189
coreminorversion=$( grep VERSION_MINOR tools/build/src/engine/patchlevel.h | tr -s ' ' | cut -d' ' -f 3)
191
190
if [[ " ${enginemajorversion} " == " ${coremajorversion} " ]] && [[ " ${engineminorversion} " == " ${coreminorversion} " ]]; then
You can’t perform that action at this time.
0 commit comments