From d3b1c7d576b4cdc6ec730069b1d828f9e4bfda52 Mon Sep 17 00:00:00 2001 From: haiqi96 <14502009+haiqi96@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:44:28 -0500 Subject: [PATCH] Allow source package installation scripts to be called from any directory. (#281) --- .../centos7.4/install-packages-from-source.sh | 25 +++++++++++-------- .../install-packages-from-source.sh | 19 ++++++++------ .../install-packages-from-source.sh | 19 ++++++++------ 3 files changed, 36 insertions(+), 27 deletions(-) diff --git a/components/core/tools/scripts/lib_install/centos7.4/install-packages-from-source.sh b/components/core/tools/scripts/lib_install/centos7.4/install-packages-from-source.sh index 38d4ef995..709f6b961 100755 --- a/components/core/tools/scripts/lib_install/centos7.4/install-packages-from-source.sh +++ b/components/core/tools/scripts/lib_install/centos7.4/install-packages-from-source.sh @@ -14,16 +14,19 @@ source /opt/rh/rh-git227/enable # unbound variables in them. set -u +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +lib_install_scripts_dir=$script_dir/.. + # NOTE: cmake and boost must be installed first since the remaining packages depend on them -./tools/scripts/lib_install/install-cmake.sh 3.21.2 -./tools/scripts/lib_install/install-boost.sh 1.76.0 +"$lib_install_scripts_dir"/install-cmake.sh 3.21.2 +"$lib_install_scripts_dir"/install-boost.sh 1.76.0 -./tools/scripts/lib_install/fmtlib.sh 8.0.1 -./tools/scripts/lib_install/libarchive.sh 3.5.1 -./tools/scripts/lib_install/lz4.sh 1.8.2 -./tools/scripts/lib_install/mariadb-connector-c.sh 3.2.3 -./tools/scripts/lib_install/mongoc.sh 1.24.4 -./tools/scripts/lib_install/mongocxx.sh 3.8.0 -./tools/scripts/lib_install/msgpack.sh 6.0.0 -./tools/scripts/lib_install/spdlog.sh 1.9.2 -./tools/scripts/lib_install/zstandard.sh 1.4.9 +"$lib_install_scripts_dir"/fmtlib.sh 8.0.1 +"$lib_install_scripts_dir"/libarchive.sh 3.5.1 +"$lib_install_scripts_dir"/lz4.sh 1.8.2 +"$lib_install_scripts_dir"/mariadb-connector-c.sh 3.2.3 +"$lib_install_scripts_dir"/mongoc.sh 1.24.4 +"$lib_install_scripts_dir"/mongocxx.sh 3.8.0 +"$lib_install_scripts_dir"/msgpack.sh 6.0.0 +"$lib_install_scripts_dir"/spdlog.sh 1.9.2 +"$lib_install_scripts_dir"/zstandard.sh 1.4.9 diff --git a/components/core/tools/scripts/lib_install/ubuntu-focal/install-packages-from-source.sh b/components/core/tools/scripts/lib_install/ubuntu-focal/install-packages-from-source.sh index 2c7c33ced..527f392a5 100755 --- a/components/core/tools/scripts/lib_install/ubuntu-focal/install-packages-from-source.sh +++ b/components/core/tools/scripts/lib_install/ubuntu-focal/install-packages-from-source.sh @@ -6,11 +6,14 @@ set -e # Error on undefined variable set -u -./tools/scripts/lib_install/fmtlib.sh 8.0.1 -./tools/scripts/lib_install/libarchive.sh 3.5.1 -./tools/scripts/lib_install/lz4.sh 1.8.2 -./tools/scripts/lib_install/mongoc.sh 1.24.4 -./tools/scripts/lib_install/mongocxx.sh 3.8.0 -./tools/scripts/lib_install/msgpack.sh 6.0.0 -./tools/scripts/lib_install/spdlog.sh 1.9.2 -./tools/scripts/lib_install/zstandard.sh 1.4.9 +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +lib_install_scripts_dir=$script_dir/.. + +"$lib_install_scripts_dir"/fmtlib.sh 8.0.1 +"$lib_install_scripts_dir"/libarchive.sh 3.5.1 +"$lib_install_scripts_dir"/lz4.sh 1.8.2 +"$lib_install_scripts_dir"/mongoc.sh 1.24.4 +"$lib_install_scripts_dir"/mongocxx.sh 3.8.0 +"$lib_install_scripts_dir"/msgpack.sh 6.0.0 +"$lib_install_scripts_dir"/spdlog.sh 1.9.2 +"$lib_install_scripts_dir"/zstandard.sh 1.4.9 diff --git a/components/core/tools/scripts/lib_install/ubuntu-jammy/install-packages-from-source.sh b/components/core/tools/scripts/lib_install/ubuntu-jammy/install-packages-from-source.sh index 2c7c33ced..527f392a5 100755 --- a/components/core/tools/scripts/lib_install/ubuntu-jammy/install-packages-from-source.sh +++ b/components/core/tools/scripts/lib_install/ubuntu-jammy/install-packages-from-source.sh @@ -6,11 +6,14 @@ set -e # Error on undefined variable set -u -./tools/scripts/lib_install/fmtlib.sh 8.0.1 -./tools/scripts/lib_install/libarchive.sh 3.5.1 -./tools/scripts/lib_install/lz4.sh 1.8.2 -./tools/scripts/lib_install/mongoc.sh 1.24.4 -./tools/scripts/lib_install/mongocxx.sh 3.8.0 -./tools/scripts/lib_install/msgpack.sh 6.0.0 -./tools/scripts/lib_install/spdlog.sh 1.9.2 -./tools/scripts/lib_install/zstandard.sh 1.4.9 +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +lib_install_scripts_dir=$script_dir/.. + +"$lib_install_scripts_dir"/fmtlib.sh 8.0.1 +"$lib_install_scripts_dir"/libarchive.sh 3.5.1 +"$lib_install_scripts_dir"/lz4.sh 1.8.2 +"$lib_install_scripts_dir"/mongoc.sh 1.24.4 +"$lib_install_scripts_dir"/mongocxx.sh 3.8.0 +"$lib_install_scripts_dir"/msgpack.sh 6.0.0 +"$lib_install_scripts_dir"/spdlog.sh 1.9.2 +"$lib_install_scripts_dir"/zstandard.sh 1.4.9