aboutsummaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorTony Sarajärvi <tony.sarajarvi@qt.io>2017-02-09 23:35:47 +0200
committerTony Sarajärvi <tony.sarajarvi@qt.io>2017-02-15 18:44:14 +0000
commit00635a672aaf0f8db9c33637ee72e33f780fdd38 (patch)
tree9404e9cd3771b24c91984208eff5edb3c1ce9fa2 /coin
parentc4a5844e256a9713a1ccfba253d7fbe6b4d3cf8a (diff)
Provision: Set bash_profile to read .bashrc in macOS 10.12
The method (vmware tools) of launching a process inside a virtual machine results in the launch of a process that does not originate from a login shell. Therefore the CI system explicitly starts the agent with "bash -l -c" to enforce the invocation as login shell and thus execute settings from /etc/profile, ~/.bash_profile, etc. This brings the behavior of the system closer to what we see as developers. However the shell is a non-interactive shell, therefore ~/.bashrc is not read by default. On Linux systems such as RHEL, ~/.bash_profile is configured to still read ~/.bashrc. For consistency we apply the same logic to the macOS configurations. Task-number: QTQAINFRA-1091 Change-Id: I72206dbd8f7289de86830db23fa1ae2c548181eb Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'coin')
-rw-r--r--coin/provisioning/qtci-macos-10.12-x86_64/003-bashprofile.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/003-bashprofile.sh b/coin/provisioning/qtci-macos-10.12-x86_64/003-bashprofile.sh
new file mode 100644
index 00000000..0fbe7628
--- /dev/null
+++ b/coin/provisioning/qtci-macos-10.12-x86_64/003-bashprofile.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Read .bashrc if exist
+printf -- "# Get the aliases and functions\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n" >> ~/.bash_profile
+