Fix environment variable checking for proxy

Change-Id: Iec261d4ce4e84ba656edf9de52b4dc42d0249e51
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
This commit is contained in:
Tony Sarajärvi
2018-01-30 23:52:33 +02:00
committed by Liang Qi
parent 052aa06ef4
commit b4b62658ac
5 changed files with 5 additions and 5 deletions

View File

@@ -88,7 +88,7 @@ try
fi
echo "Running SDK manager for platforms;$sdkApiLevel, tools, platform-tools and build-tools;$sdkBuildToolsVersion."
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
proxy_host=$(echo $proxy | cut -d'/' -f3 | cut -d':' -f1)
proxy_port=$(echo $proxy | cut -d':' -f3)
echo "y" |"$sdkTargetFolder/tools/bin/sdkmanager" --no_https --proxy=http --proxy_host=$proxy_host --proxy_port=$proxy_port "platforms;$sdkApiLevel" "tools" "platform-tools" "build-tools;$sdkBuildToolsVersion" || throw $ExceptionSdkManager

View File

@@ -37,6 +37,6 @@ set -ex
source "${BASH_SOURCE%/*}/../common/unix/check_and_set_proxy.sh"
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
echo "proxy=$proxy" | sudo tee -a /etc/yum.conf
fi

View File

@@ -51,6 +51,6 @@ gsettings set org.gnome.desktop.screensaver lock-enabled false
# disable blank screen power saving
gsettings set org.gnome.desktop.session idle-delay 0
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
echo "proxy=$proxy" | sudo tee -a /etc/yum.conf
fi

View File

@@ -66,7 +66,7 @@ try
echo "Set Network Test Server address to $NTS_IP in /etc/hosts"
echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts || throw $ExceptionNTS
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
echo "Acquire::http::Proxy \"$proxy\";" | sudo tee -a /etc/apt/apt.conf || throw $ExceptionProxy
fi
)

View File

@@ -18,7 +18,7 @@ echo 'export DISPLAY=":0"' >> ~/.bashrc
echo "Disabling file indexing."
sudo balooctl disable
if [ "$proxy" != "" ]; then
if [ "$http_proxy" != "" ]; then
sudo sed -i 's/PROXY_ENABLED=\"no\"/PROXY_ENABLED=\"yes\"/' /etc/sysconfig/proxy
sudo sed -i "s|HTTP_PROXY=\".*\"|HTTP_PROXY=\"$proxy\"|" /etc/sysconfig/proxy
fi