-
Notifications
You must be signed in to change notification settings - Fork 0
/
fordProxy
executable file
·26 lines (20 loc) · 1.13 KB
/
fordProxy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
export http_proxy='http://internet.ford.com:83'
export https_proxy='http://internet.ford.com:83'
export no_proxy='*.ford.com|localhost|internet.ford.com'
if [ ! -f ~/.gradle/gradle-proxy.properties ]; then
touch ~/.gradle/gradle-proxy.properties
echo 'systemProp.http.proxyHost="internet.ford.com"' > ~/.gradle/gradle-proxy.properties
echo 'systemProp.https.proxyHost="internet.ford.com"' >> ~/.gradle/gradle-proxy.properties
echo 'systemProp.http.proxyPort=83' >> ~/.gradle/gradle-proxy.properties
echo 'systemProp.https.proxyPort=83' >> ~/.gradle/gradle-proxy.properties
echo 'systemProp.http.nonProxyHosts="localhost|127.0.0.0/8|::1|nexus.ford.com|*.apps.pd01.edc.caas.ford.com|192.168.1.0/16|*.shc.ford.com' >> ~/.gradle/gradle-proxy.properties
fi
if [ ! -f ~/.gradle/gradle.properties.bak ]; then
touch ~/.gradle/gradle.properties
cp ~/.gradle/gradle.properties ~/.gradle/gradle.properties.bak
fi
git config --global http.proxy $http_proxy
git config --global https.proxy $https_proxy
cat ~/.gradle/gradle.properties.bak > ~/.gradle/gradle.properties
cat ~/.gradle/gradle-proxy.properties >> ~/.gradle/gradle.properties