summaryrefslogtreecommitdiffstats
path: root/coin/provisioning
diff options
context:
space:
mode:
authorTony Sarajärvi <tony.sarajarvi@qt.io>2018-01-06 20:24:01 +0200
committerLiang Qi <liang.qi@qt.io>2018-01-07 15:20:37 +0000
commit22e4664eb08dc5384c5afd0bd6c6a0725b242517 (patch)
treef55b30eeba64be8fea6369a2a18707931d0a8454 /coin/provisioning
parent84899eca4c6dcc6def56abae781e5489c4f950a2 (diff)
Fix opcua provisioning by sourcing .profile
When CMake is installed it exports its install path into .profile. However, freeopcua doesn't source it as builds do, so it couldn't find the cmake. Also, as Ubuntu is using .profile in our builds, this commit fixes so that the PATH is actually written into the right file. Task-number: QTBUG-65594 Change-Id: I561a88a07872436bb4a3bd62a2d55fd56a130121 Reviewed-by: Joni Jäntti <joni.jantti@qt.io> Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'coin/provisioning')
-rwxr-xr-xcoin/provisioning/common/cmake_linux.sh6
-rw-r--r--coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/42-freeopcua.sh1
2 files changed, 6 insertions, 1 deletions
diff --git a/coin/provisioning/common/cmake_linux.sh b/coin/provisioning/common/cmake_linux.sh
index 35313d3c..3efe35a0 100755
--- a/coin/provisioning/common/cmake_linux.sh
+++ b/coin/provisioning/common/cmake_linux.sh
@@ -50,4 +50,8 @@ appPrefix="cmake-$version-Linux-x86_64"
InstallFromCompressedFileFromURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$targetFolder" "$appPrefix"
echo "Adding $targetFolder/bin to PATH"
-echo "export PATH=$targetFolder/bin:\$PATH" >> ~/.bashrc
+if uname -a |grep -q "Ubuntu"; then
+ echo "export PATH=$targetFolder/bin:\$PATH" >> ~/.profile
+else
+ echo "export PATH=$targetFolder/bin:\$PATH" >> ~/.bashrc
+fi
diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/42-freeopcua.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/42-freeopcua.sh
index 4f4fd6ea..0410cf97 100644
--- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/42-freeopcua.sh
+++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/42-freeopcua.sh
@@ -44,6 +44,7 @@ cd freeopcua
git checkout ca75e05a8e63d88dbfc259e1251f405106411b66
mkdir build
cd build
+source ~/.profile
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
make
sudo make install