8000 Fixes install_or_tools.sh by roytman · Pull Request #1911 · fybrik/fybrik · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixes install_or_tools.sh #1911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jan 22, 2023
Merged
11 changes: 7 additions & 4 deletions hack/tools/install_or_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Copyright 2020 IBM Corp.
# SPDX-License-Identifier: Apache-2.0


cd "${0%/*}"
source ./common.sh

VERSION_FILE=lib/fzn-or-tools-version

case ${os} in
linux)
Expand All @@ -22,10 +22,12 @@ case ${os} in
;;
esac

header_text "Checking for bin/fzn-or-tools ${OR_TOOLS_VERSION}.${OR_TOOLS_BUILD}"
[[ -f bin/fzn-or-tools ]] && [[ -f lib/libfz.so ]] && exit 0
DEPLOY="${OR_TOOLS_VERSION}.${OR_TOOLS_BUILD}_for_${arch}_${target_os}"

header_text "Checking for bin/fzn-or-tools ${DEPLOY}"
[[ -f bin/fzn-or-tools ]] && [[ -f "${VERSION_FILE}" ]] && [[ `cat "${VERSION_FILE}"` == "${DEPLOY}" ]] && exit 0
header_text "Installing bin/fzn-or-tools ${DEPLOY}"

header_text "Installing bin/fzn-or-tools ${OR_TOOLS_VERSION}.${OR_TOOLS_BUILD}"
mkdir -p ./bin
mkdir -p ./lib

Expand All @@ -37,3 +39,4 @@ tar -zxvf ./${download_file} -C $tmp
mv $tmp/*/bin/fzn-ortools ./bin/fzn-or-tools
mv $tmp/*/lib*/lib*.${dyn_lib_ext}* ./lib
chmod +x ./bin/fzn-or-tools
echo ${DEPLOY} > ${VERSION_FILE}
0