From c26466124e65d02278d83f1e11dd263f036c5aca Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 07:36:41 +0000 Subject: [PATCH 01/19] [github-acction] build jobs failure due to deprecated macOS-12 environment The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15. For more details, see https://github.com/actions/runner-images/issues/10721 --- .github/workflows/android-app-build.yml | 2 +- .github/workflows/build.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android-app-build.yml b/.github/workflows/android-app-build.yml index bc140c10..2012f200 100644 --- a/.github/workflows/android-app-build.yml +++ b/.github/workflows/android-app-build.yml @@ -37,7 +37,7 @@ jobs: matrix: android-api: [26, 34] android-abi: [x86_64] - os: [macos-12, ubuntu-22.04] + os: [macos-13, ubuntu-22.04] steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v4 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6c9b2ad6..7844a7d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,7 +125,7 @@ jobs: ./tests/interpreter-test macos: - runs-on: macos-12 + runs-on: macos-13 steps: - uses: actions/checkout@v3 - name: Bootstrap @@ -163,7 +163,7 @@ jobs: ANDROID_ABI=arm64-v8a ANDROID_NDK_HOME=$(find $ANDROID_HOME/ndk -name "26.*") ./build-commissioner-libs.sh java-binding: - runs-on: macos-12 + runs-on: macos-13 steps: - uses: actions/checkout@v3 - name: Bootstrap From a3d197e26d88074494951c14c756394e2f0caee3 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 07:36:41 +0000 Subject: [PATCH 02/19] [github-acction] build jobs failure due to deprecated macOS-12 environment The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15. For more details, see https://github.com/actions/runner-images/issues/10721 In addition, removing -s option because the -s option is not supported by the realpath command in macOS 13 (Ventura) and later versions --- tests/integration/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/common.sh b/tests/integration/common.sh index 1372f114..2c010ed0 100755 --- a/tests/integration/common.sh +++ b/tests/integration/common.sh @@ -29,7 +29,7 @@ ## This file defines constants and common functions for test cases. -readonly CUR_DIR=$(dirname "$(realpath -s $0)") +readonly CUR_DIR=$(dirname "$(realpath $0)") readonly TEST_ROOT_DIR=${CUR_DIR} readonly RUNTIME_DIR=/tmp/test-ot-commissioner From fa546cc844728903e8b7f37ceada01bbacdbcfd9 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 07:36:41 +0000 Subject: [PATCH 03/19] [github-acction] build jobs failure due to deprecated macOS-12 environment The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15. For more details, see https://github.com/actions/runner-images/issues/10721 In addition, removing -s option because the -s option is not supported by the realpath command in macOS 13 (Ventura) and later versions --- android/build-commissioner-libs.sh | 2 +- script/bootstrap.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index ed9c40e9..651a0946 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" +readonly CUR_DIR="$(dirname "$(realpath "$0")")" set -e diff --git a/script/bootstrap.sh b/script/bootstrap.sh index f817cba5..4e209bdd 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -138,7 +138,7 @@ else exit 1 fi -readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" +readonly CUR_DIR="$(dirname "$(realpath "$0")")" cd "${CUR_DIR}/.." if [ "${WITH_CCM}" = "1" ]; then From e053b353300a20c3e30bbcc9f6068722b83fb1de Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 09:01:55 +0000 Subject: [PATCH 04/19] Revert "[github-acction] build jobs failure due to deprecated macOS-12 environment" This reverts commit fa546cc844728903e8b7f37ceada01bbacdbcfd9. --- android/build-commissioner-libs.sh | 2 +- script/bootstrap.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index 651a0946..ed9c40e9 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -readonly CUR_DIR="$(dirname "$(realpath "$0")")" +readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" set -e diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 4e209bdd..f817cba5 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -138,7 +138,7 @@ else exit 1 fi -readonly CUR_DIR="$(dirname "$(realpath "$0")")" +readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" cd "${CUR_DIR}/.." if [ "${WITH_CCM}" = "1" ]; then From 07040549ed180f3f88d6f966605c2ab4c23c548c Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 09:31:39 +0000 Subject: [PATCH 05/19] [github-acction] build jobs failure due to deprecated macOS-12 environment [github-acction] build jobs failure due to deprecated macOS-12 environment The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15. For more details, see https://github.com/actions/runner-images/issues/10721 In addition, removing -s option because the -s option is not supported by the realpath command in macOS 13 (Ventura) and later versions --- script/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index f817cba5..4e209bdd 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -138,7 +138,7 @@ else exit 1 fi -readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" +readonly CUR_DIR="$(dirname "$(realpath "$0")")" cd "${CUR_DIR}/.." if [ "${WITH_CCM}" = "1" ]; then From fcfd013ec3f994f826ed075b36af1ff73cf6be35 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 09:31:39 +0000 Subject: [PATCH 06/19] [github-acction] build jobs failure due to deprecated macOS-12 environment [github-acction] build jobs failure due to deprecated macOS-12 environment The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15. For more details, see https://github.com/actions/runner-images/issues/10721 In addition, removing -s option because the -s option is not supported by the realpath command in macOS 13 (Ventura) and later versions --- tests/integration/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/common.sh b/tests/integration/common.sh index 2c010ed0..1372f114 100755 --- a/tests/integration/common.sh +++ b/tests/integration/common.sh @@ -29,7 +29,7 @@ ## This file defines constants and common functions for test cases. -readonly CUR_DIR=$(dirname "$(realpath $0)") +readonly CUR_DIR=$(dirname "$(realpath -s $0)") readonly TEST_ROOT_DIR=${CUR_DIR} readonly RUNTIME_DIR=/tmp/test-ot-commissioner From 889a79a2afd9e11b2dbf6546396323e83c6b49cd Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 09:56:01 +0000 Subject: [PATCH 07/19] handling the build failure in nightly-build (26, x86_64, macos-13) Here is the failure log Run cd android realpath: illegal option -- s usage: realpath [-q] [path ...] CMake Deprecation Warning at /Users/runner/Library/Android/sdk/ndk/26.3.11579264/build/cmake/android.toolchain.cmake:34 (cmake_minimum_required): Compatibility with CMake < 3.10 will be removed from a future version of CMake. --- android/build-commissioner-libs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index ed9c40e9..651a0946 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -27,7 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" +readonly CUR_DIR="$(dirname "$(realpath "$0")")" set -e From a792f4e913995499e79af0b37ee899c04b74a160 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 10:23:08 +0000 Subject: [PATCH 08/19] execute the realpath command based on OS environment --- android/build-commissioner-libs.sh | 7 ++++++- script/bootstrap.sh | 6 ++++-- tests/integration/common.sh | 8 +++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index 651a0946..8c2d0a7a 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -27,7 +27,12 @@ # POSSIBILITY OF SUCH DAMAGE. # -readonly CUR_DIR="$(dirname "$(realpath "$0")")" +if [ "$(uname)" = "Linux" ]; then + echo "OS is Linux" + readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" +elif [ "$(uname)" = "Darwin" ]; then + echo "OS is Darwin" + readonly CUR_DIR="$(dirname "$(realpath "$0")")" set -e diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 4e209bdd..7343ac9b 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -106,6 +106,8 @@ if [ "$(uname)" = "Linux" ]; then exit 1 } + readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" + elif [ "$(uname)" = "Darwin" ]; then echo "OS is Darwin" @@ -133,13 +135,13 @@ elif [ "$(uname)" = "Darwin" ]; then ## Install coreutils for realpath brew install coreutils + + readonly CUR_DIR="$(dirname "$(realpath "$0")")" else echo "platform $(uname) is not fully supported" exit 1 fi -readonly CUR_DIR="$(dirname "$(realpath "$0")")" - cd "${CUR_DIR}/.." if [ "${WITH_CCM}" = "1" ]; then git submodule update --init --recursive --depth=1 --progress diff --git a/tests/integration/common.sh b/tests/integration/common.sh index 1372f114..9b00a134 100755 --- a/tests/integration/common.sh +++ b/tests/integration/common.sh @@ -29,7 +29,13 @@ ## This file defines constants and common functions for test cases. -readonly CUR_DIR=$(dirname "$(realpath -s $0)") +if [ "$(uname)" = "Linux" ]; then + echo "OS is Linux" + readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" +elif [ "$(uname)" = "Darwin" ]; then + echo "OS is Darwin" + readonly CUR_DIR="$(dirname "$(realpath "$0")")" + readonly TEST_ROOT_DIR=${CUR_DIR} readonly RUNTIME_DIR=/tmp/test-ot-commissioner From c5cd58048851f012f42078adaf75a7d175428ab1 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 10:23:08 +0000 Subject: [PATCH 09/19] execute the realpath command based on OS environment --- android/build-commissioner-libs.sh | 1 + tests/integration/common.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index 8c2d0a7a..0d9d8cae 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -33,6 +33,7 @@ if [ "$(uname)" = "Linux" ]; then elif [ "$(uname)" = "Darwin" ]; then echo "OS is Darwin" readonly CUR_DIR="$(dirname "$(realpath "$0")")" +fi set -e diff --git a/tests/integration/common.sh b/tests/integration/common.sh index 9b00a134..2f14864e 100755 --- a/tests/integration/common.sh +++ b/tests/integration/common.sh @@ -35,6 +35,7 @@ if [ "$(uname)" = "Linux" ]; then elif [ "$(uname)" = "Darwin" ]; then echo "OS is Darwin" readonly CUR_DIR="$(dirname "$(realpath "$0")")" +fi readonly TEST_ROOT_DIR=${CUR_DIR} From 3f374fe9fa8db1b2796ee9764a3a2799c4d7e615 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 10:23:08 +0000 Subject: [PATCH 10/19] execute the realpath command based on OS environment --- script/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 7343ac9b..936d1f9e 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -136,6 +136,8 @@ elif [ "$(uname)" = "Darwin" ]; then ## Install coreutils for realpath brew install coreutils + brew install ninja + readonly CUR_DIR="$(dirname "$(realpath "$0")")" else echo "platform $(uname) is not fully supported" From ba76632b8d6e8807d7a0d4a7029016c5a9bd8db1 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 10:23:08 +0000 Subject: [PATCH 11/19] execute the realpath command based on OS environment --- script/bootstrap.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 936d1f9e..a08d5647 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -113,12 +113,12 @@ elif [ "$(uname)" = "Darwin" ]; then ## Install packages brew update - brew install coreutils \ - readline \ - cmake \ - ninja \ - swig@4 \ - lcov && true + brew install coreutils + brew install readline + brew install cmake + brew install ninja + brew install swig@4 + brew install lcov brew install llvm@14 && \ sudo ln -s "$(brew --prefix llvm@14)/bin/clang-format" /usr/local/bin/clang-format-14 && \ From 2e8bfaf0cd792b42dbc4319741a75bee0539d27d Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 10:23:08 +0000 Subject: [PATCH 12/19] execute the realpath command based on OS environment --- script/bootstrap.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index a08d5647..4fe4fad2 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -117,7 +117,11 @@ elif [ "$(uname)" = "Darwin" ]; then brew install readline brew install cmake brew install ninja +<<<<<<< HEAD brew install swig@4 +======= + brew install swig +>>>>>>> 170baf0 (execute the realpath command based on OS environment) brew install lcov brew install llvm@14 && \ From ea298911514ef61f2ccf7b9f584cc96176ec2eef Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 10:23:08 +0000 Subject: [PATCH 13/19] execute the realpath command based on OS environment --- script/bootstrap.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 4fe4fad2..c49eeffb 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -117,11 +117,7 @@ elif [ "$(uname)" = "Darwin" ]; then brew install readline brew install cmake brew install ninja -<<<<<<< HEAD - brew install swig@4 -======= brew install swig ->>>>>>> 170baf0 (execute the realpath command based on OS environment) brew install lcov brew install llvm@14 && \ From 6485a5142ab9ba3cfb2c97d3099b17cbc175b452 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 10:23:08 +0000 Subject: [PATCH 14/19] execute the realpath command based on OS environment --- script/bootstrap.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index c49eeffb..ddf16a14 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -113,12 +113,21 @@ elif [ "$(uname)" = "Darwin" ]; then ## Install packages brew update +<<<<<<< HEAD brew install coreutils brew install readline brew install cmake brew install ninja brew install swig brew install lcov +======= + brew install coreutils \ + readline \ + cmake \ + ninja \ + swig \ + lcov && true +>>>>>>> f9ebac8 (execute the realpath command based on OS environment) brew install llvm@14 && \ sudo ln -s "$(brew --prefix llvm@14)/bin/clang-format" /usr/local/bin/clang-format-14 && \ @@ -133,11 +142,6 @@ elif [ "$(uname)" = "Darwin" ]; then brew install cmake --HEAD } - ## Install coreutils for realpath - brew install coreutils - - brew install ninja - readonly CUR_DIR="$(dirname "$(realpath "$0")")" else echo "platform $(uname) is not fully supported" From 80ce37a5fe96b9dd23b4e4e92962cb1a18b81e1d Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 10:23:08 +0000 Subject: [PATCH 15/19] execute the realpath command based on OS environment --- script/bootstrap.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index ddf16a14..0760c166 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -113,21 +113,12 @@ elif [ "$(uname)" = "Darwin" ]; then ## Install packages brew update -<<<<<<< HEAD - brew install coreutils - brew install readline - brew install cmake - brew install ninja - brew install swig - brew install lcov -======= brew install coreutils \ readline \ cmake \ ninja \ swig \ lcov && true ->>>>>>> f9ebac8 (execute the realpath command based on OS environment) brew install llvm@14 && \ sudo ln -s "$(brew --prefix llvm@14)/bin/clang-format" /usr/local/bin/clang-format-14 && \ From 461319e1bb7bc2890da1baac408a3479b8ce91e4 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 07:36:41 +0000 Subject: [PATCH 16/19] [github-acction] build jobs failure due to deprecated macOS-12 environment The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15. For more details, see https://github.com/actions/runner-images/issues/10721 In addition, removing -s option because the -s option is not supported by the realpath command in macOS 13 (Ventura) and later versions, so execute realpath differently depending on Linux and MacOS. --- script/bootstrap.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 0760c166..128af416 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -114,11 +114,11 @@ elif [ "$(uname)" = "Darwin" ]; then ## Install packages brew update brew install coreutils \ - readline \ - cmake \ - ninja \ - swig \ - lcov && true + readline \ + cmake \ + ninja \ + swig \ + lcov && true brew install llvm@14 && \ sudo ln -s "$(brew --prefix llvm@14)/bin/clang-format" /usr/local/bin/clang-format-14 && \ From 9ad51874387413324b177bb2246c9fc60dfa9eef Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 07:36:41 +0000 Subject: [PATCH 17/19] [github-acction] build jobs failure due to deprecated macOS-12 environment The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15. For more details, see https://github.com/actions/runner-images/issues/10721 In addition, removing -s option because the -s option is not supported by the realpath command in macOS 13 (Ventura) and later versions, so execute realpath differently depending on Linux and MacOS. --- tests/integration/common.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/integration/common.sh b/tests/integration/common.sh index 2f14864e..4b5f99b0 100755 --- a/tests/integration/common.sh +++ b/tests/integration/common.sh @@ -29,14 +29,7 @@ ## This file defines constants and common functions for test cases. -if [ "$(uname)" = "Linux" ]; then - echo "OS is Linux" - readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" -elif [ "$(uname)" = "Darwin" ]; then - echo "OS is Darwin" - readonly CUR_DIR="$(dirname "$(realpath "$0")")" -fi - +readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" readonly TEST_ROOT_DIR=${CUR_DIR} readonly RUNTIME_DIR=/tmp/test-ot-commissioner From 56893daeba3808433d7c3a329c236a19d268ddef Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 16:49:42 +0000 Subject: [PATCH 18/19] restore the common.sh file --- tests/integration/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/common.sh b/tests/integration/common.sh index 4b5f99b0..1372f114 100755 --- a/tests/integration/common.sh +++ b/tests/integration/common.sh @@ -29,7 +29,7 @@ ## This file defines constants and common functions for test cases. -readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" +readonly CUR_DIR=$(dirname "$(realpath -s $0)") readonly TEST_ROOT_DIR=${CUR_DIR} readonly RUNTIME_DIR=/tmp/test-ot-commissioner From 4002d9d5492084a9131682341e217626ff561075 Mon Sep 17 00:00:00 2001 From: lezhan Date: Wed, 4 Dec 2024 16:49:42 +0000 Subject: [PATCH 19/19] restore the common.sh file --- android/build-commissioner-libs.sh | 8 +------- script/bootstrap.sh | 7 ++----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/android/build-commissioner-libs.sh b/android/build-commissioner-libs.sh index 0d9d8cae..651a0946 100755 --- a/android/build-commissioner-libs.sh +++ b/android/build-commissioner-libs.sh @@ -27,13 +27,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(uname)" = "Linux" ]; then - echo "OS is Linux" - readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" -elif [ "$(uname)" = "Darwin" ]; then - echo "OS is Darwin" - readonly CUR_DIR="$(dirname "$(realpath "$0")")" -fi +readonly CUR_DIR="$(dirname "$(realpath "$0")")" set -e diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 128af416..86933324 100755 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -105,9 +105,6 @@ if [ "$(uname)" = "Linux" ]; then echo "Did you forget to add '/usr/bin' to beginning of your PATH?" exit 1 } - - readonly CUR_DIR="$(dirname "$(realpath -s "$0")")" - elif [ "$(uname)" = "Darwin" ]; then echo "OS is Darwin" @@ -132,13 +129,13 @@ elif [ "$(uname)" = "Darwin" ]; then brew unlink cmake brew install cmake --HEAD } - - readonly CUR_DIR="$(dirname "$(realpath "$0")")" else echo "platform $(uname) is not fully supported" exit 1 fi +readonly CUR_DIR="$(dirname "$(realpath "$0")")" + cd "${CUR_DIR}/.." if [ "${WITH_CCM}" = "1" ]; then git submodule update --init --recursive --depth=1 --progress