Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ CMAKE_PACKAGE_ROOT_ARGS=""
OR_TOOLS_PATH=""
INSTALL_SUMMARY=()
VERBOSE_MODE="no"
OPT_NOCERT=""

# Colors
if [[ -t 1 ]]; then
Expand Down Expand Up @@ -256,7 +257,7 @@ _execute() {
return
fi

echo -n "${BLUE}${BOLD}[INFO]${NC} ${description}..."
echo -n "${BLUE}${BOLD}[INFO]${NC} ${description}"
local log_file
log_file=$(mktemp)
if ! "$@" &> "${log_file}"; then
Expand Down Expand Up @@ -294,7 +295,7 @@ _install_cmake() {
else
cmake_checksum=${CMAKE_CHECKSUM_X86_64}
fi
_execute "Downloading CMake..." wget "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION_SMALL}/cmake-${CMAKE_VERSION_SMALL}-linux-${arch}.sh"
_execute "Downloading CMake..." wget $OPT_NOCERT "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION_SMALL}/cmake-${CMAKE_VERSION_SMALL}-linux-${arch}.sh"
_verify_checksum "${cmake_checksum}" "cmake-${CMAKE_VERSION_SMALL}-linux-${arch}.sh" || error "CMake checksum failed."
chmod +x "cmake-${CMAKE_VERSION_SMALL}-linux-${arch}.sh"
_execute "Installing CMake..." "./cmake-${CMAKE_VERSION_SMALL}-linux-${arch}.sh" --skip-license --prefix="${cmake_prefix}"
Expand Down Expand Up @@ -333,7 +334,7 @@ _install_bison() {
for mirror in "${mirrors[@]}"; do
local url="${mirror}/bison-${BISON_VERSION}.tar.gz"
log "Trying to download bison from: $url"
if wget "$url"; then
if wget $OPT_NOCERT "$url"; then
success=1
break
else
Expand Down Expand Up @@ -373,7 +374,7 @@ _install_flex() {
if [[ "${flex_installed_version}" != "${FLEX_VERSION}" ]]; then
(
cd "${BASE_DIR}"
_execute "Downloading Flex..." wget https://github.com/westes/flex/releases/download/v${FLEX_VERSION}/flex-${FLEX_VERSION}.tar.gz
_execute "Downloading Flex..." wget $OPT_NOCERT https://github.com/westes/flex/releases/download/v${FLEX_VERSION}/flex-${FLEX_VERSION}.tar.gz
_verify_checksum "${FLEX_CHECKSUM}" "flex-${FLEX_VERSION}.tar.gz" || error "Flex checksum failed."
_execute "Extracting Flex..." tar xf "flex-${FLEX_VERSION}.tar.gz"
cd "flex-${FLEX_VERSION}"
Expand Down Expand Up @@ -405,7 +406,7 @@ _install_swig() {
(
cd "${BASE_DIR}"
local tar_name="v${SWIG_VERSION}.tar.gz"
_execute "Downloading SWIG..." wget "https://github.com/swig/swig/archive/${tar_name}"
_execute "Downloading SWIG..." wget $OPT_NOCERT "https://github.com/swig/swig/archive/${tar_name}"
_verify_checksum "${SWIG_CHECKSUM}" "${tar_name}" || error "SWIG checksum failed."
_execute "Extracting SWIG..." tar xfz "${tar_name}"
cd swig-*
Expand Down Expand Up @@ -446,7 +447,7 @@ _install_pcre() {
(
cd "${BASE_DIR}"
local pcre_tar_name="pcre2-${PCRE_VERSION}.tar.gz"
_execute "Downloading PCRE..." wget "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${PCRE_VERSION}/${pcre_tar_name}"
_execute "Downloading PCRE..." wget $OPT_NOCERT "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${PCRE_VERSION}/${pcre_tar_name}"
_verify_checksum "${PCRE_CHECKSUM}" "${pcre_tar_name}" || error "PCRE checksum failed."
_execute "Extracting PCRE..." tar xf "${pcre_tar_name}"
cd "pcre2-${PCRE_VERSION}"
Expand Down Expand Up @@ -474,7 +475,7 @@ _install_boost() {
(
cd "${BASE_DIR}"
local boost_version_underscore=${BOOST_VERSION_SMALL//./_}
_execute "Downloading Boost..." wget "https://archives.boost.io/release/${BOOST_VERSION_SMALL}/source/boost_${boost_version_underscore}.tar.gz"
_execute "Downloading Boost..." wget $OPT_NOCERT "https://archives.boost.io/release/${BOOST_VERSION_SMALL}/source/boost_${boost_version_underscore}.tar.gz"
_verify_checksum "${BOOST_CHECKSUM}" "boost_${boost_version_underscore}.tar.gz" || error "Boost checksum failed."
_execute "Extracting Boost..." tar -xf "boost_${boost_version_underscore}.tar.gz"
cd "boost_${boost_version_underscore}"
Expand Down Expand Up @@ -636,7 +637,7 @@ _install_gtest() {
if [[ ! -d ${gtest_prefix}/include/gtest ]]; then
(
cd "${BASE_DIR}"
_execute "Downloading gtest..." wget "https://github.com/google/googletest/archive/refs/tags/v${GTEST_VERSION}.zip"
_execute "Downloading gtest..." wget $OPT_NOCERT "https://github.com/google/googletest/archive/refs/tags/v${GTEST_VERSION}.zip"
_verify_checksum "${GTEST_CHECKSUM}" "v${GTEST_VERSION}.zip" || error "gtest checksum failed."
_execute "Extracting gtest..." unzip "v${GTEST_VERSION}.zip"
cd "googletest-${GTEST_VERSION}"
Expand Down Expand Up @@ -685,7 +686,7 @@ _install_abseil() {
if [[ "${absl_installed_version}" != "${required_version}" ]]; then
(
cd "${BASE_DIR}"
_execute "Downloading Abseil..." wget "https://github.com/abseil/abseil-cpp/releases/download/${ABSL_VERSION}/abseil-cpp-${ABSL_VERSION}.tar.gz"
_execute "Downloading Abseil..." wget $OPT_NOCERT "https://github.com/abseil/abseil-cpp/releases/download/${ABSL_VERSION}/abseil-cpp-${ABSL_VERSION}.tar.gz"
_verify_checksum "${ABSL_CHECKSUM}" "abseil-cpp-${ABSL_VERSION}.tar.gz" || error "Abseil checksum failed."
_execute "Extracting Abseil..." tar xf "abseil-cpp-${ABSL_VERSION}.tar.gz"
cd "abseil-cpp-${ABSL_VERSION}"
Expand Down Expand Up @@ -763,7 +764,7 @@ _install_or_tools() {
os_version=11
fi
local or_tools_file="or-tools_${arch}_${os}-${os_version}_cpp_v${OR_TOOLS_VERSION_SMALL}.tar.gz"
_execute "Downloading or-tools..." wget "https://github.com/google/or-tools/releases/download/v${OR_TOOLS_VERSION_BIG}/${or_tools_file}"
_execute "Downloading or-tools..." wget $OPT_NOCERT "https://github.com/google/or-tools/releases/download/v${OR_TOOLS_VERSION_BIG}/${or_tools_file}"
mkdir -p "${OR_TOOLS_PATH}"
_execute "Extracting or-tools..." tar --strip 1 --dir "${OR_TOOLS_PATH}" -xf "${or_tools_file}"
)
Expand Down Expand Up @@ -908,7 +909,7 @@ _install_rhel_packages() {

local arch=amd64
local pandoc_version="3.1.11.1"
_execute "Downloading pandoc..." wget "https://github.com/jgm/pandoc/releases/download/${pandoc_version}/pandoc-${pandoc_version}-linux-${arch}.tar.gz"
_execute "Downloading pandoc..." wget $OPT_NOCERT "https://github.com/jgm/pandoc/releases/download/${pandoc_version}/pandoc-${pandoc_version}-linux-${arch}.tar.gz"
_execute "Installing pandoc..." tar xvzf "pandoc-${pandoc_version}-linux-${arch}.tar.gz" --strip-components 1 -C /usr/local/
rm -rf "pandoc-${pandoc_version}-linux-${arch}.tar.gz"
_execute "Cleaning up yum cache..." yum clean -y all
Expand Down Expand Up @@ -1023,7 +1024,7 @@ _install_ci_packages() {
_execute "Installing Docker..." apt-get -y install --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin

if _version_compare "${1}" -lt "24.04"; then
_execute "Downloading LLVM install script..." wget https://apt.llvm.org/llvm.sh
_execute "Downloading LLVM install script..." wget $OPT_NOCERT https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
_execute "Installing LLVM 16..." ./llvm.sh 16 all
fi
Expand Down Expand Up @@ -1093,8 +1094,7 @@ main() {
;;
-nocert)
warn "Security certificates for downloaded packages will not be checked."
shopt -s expand_aliases
alias wget="wget --no-check-certificate"
OPT_NOCERT="--no-check-certificate"
export GIT_SSL_NO_VERIFY=true
;;
-skip-system-or-tools) SKIP_SYSTEM_OR_TOOLS="true" ;;
Expand Down
Loading