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