Skip to content

Commit

Permalink
Merge pull request #36 from fledge-iot/FOGL-7301
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-jabble authored Jan 11, 2023
2 parents 9480dac + 2ea521f commit cc8811a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@
## Author: Mark Riddoch, Massimiliano Pinto
##

set -e

fledge_location=$(pwd)
os_name=$(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
os_version=$(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
echo "Platform is ${os_name}, Version: ${os_version}"

if [[ ( ${os_name} == *"Red Hat"* || ${os_name} == *"CentOS"* ) ]]; then
echo "Installing boost components..."
sudo yum install -y boost-filesystem boost-program-options
sudo yum install -y boost-filesystem boost-program-options

if [[ ${os_version} == *"7"* ]]; then
if [[ ${os_version} == *"7"* ]]; then
echo "Installing development tools 7 components..."
sudo yum install -y yum-utils
sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
Expand All @@ -39,12 +41,12 @@ if [[ ( ${os_name} == *"Red Hat"* || ${os_name} == *"CentOS"* ) ]]; then
export CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
fi
elif apt --version 2>/dev/null; then
echo Installing boost components
sudo apt install -y libboost-filesystem-dev
sudo apt install -y libboost-program-options-dev
sudo apt install -y libmbedtls-dev
echo Installing boost components
sudo apt install -y libboost-filesystem-dev
sudo apt install -y libboost-program-options-dev
sudo apt install -y libmbedtls-dev
else
echo "Requirements cannot be automatically installed, please refer README.rst to install requirements manually"
echo "Requirements cannot be automatically installed, please refer README.rst to install requirements manually"
fi

if [[ $# -eq 1 ]]; then
Expand All @@ -59,8 +61,8 @@ if [[ -d freeopcua ]]; then rm -rf freeopcua; fi

echo Fetching Free OPCUA library
git clone https://github.com/dianomic/freeopcua.git
git checkout Kapsch
cd freeopcua
git checkout Kapsch
mkdir build
sed \
-e 's/add_library(opcuaclient/add_library(opcuaclient STATIC/' \
Expand Down

0 comments on commit cc8811a

Please sign in to comment.