Skip to content

Commit 51f4b4d

Browse files
Release 1.0.100
1 parent c8deac2 commit 51f4b4d

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

setup-mac.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function check_internet() {
3333
curl "http://github.com" > /dev/null 2>&1
3434
if [ $? -ne 0 ]; then
3535
echo "Unable to connect to internet, make sure you are connected to a network and check your proxy settings if behind a corporate proxy. Please read this tutorial for detailed info about setting your proxy https://www.predix.io/resources/tutorials/tutorial-details.html?tutorial_id=1565"
36+
echo ""
3637
exit 1
3738
fi
3839
echo "OK"
@@ -50,6 +51,39 @@ function check_bash_profile() {
5051
prefix_to_path /usr/local/bin
5152
}
5253

54+
function get_proxy_scripts() {
55+
VERIFY_PROXY_URL=https://raw.githubusercontent.com/PredixDev/predix-scripts/master/bash/common/proxy/verify-proxy.sh
56+
TOGGLE_PROXY_URL=https://raw.githubusercontent.com/PredixDev/predix-scripts/master/bash/common/proxy/toggle-proxy.sh
57+
ENABLE_XSL_URL=https://raw.githubusercontent.com/PredixDev/predix-scripts/master/bash/common/proxy/enable-proxy.xsl
58+
DISABLE_XSL_URL=https://raw.githubusercontent.com/PredixDev/predix-scripts/master/bash/common/proxy/disable-proxy.xsl
59+
60+
if [ -f "verify-proxy.sh" ]; then
61+
rm verify-proxy.sh
62+
fi
63+
if [ -f "toggle-proxy.sh" ]; then
64+
rm toggle-proxy.sh
65+
fi
66+
if [ -f "enable-proxy.xsl" ]; then
67+
rm enable-proxy.xsl
68+
fi
69+
if [ -f "disable-proxy.xsl" ]; then
70+
rm disable-proxy.xsl
71+
fi
72+
73+
if [ ! -f "verify-proxy.sh" ]; then
74+
curl -s -O $VERIFY_PROXY_URL
75+
fi
76+
if [ ! -f "toggle-proxy.sh" ]; then
77+
curl -s -O $TOGGLE_PROXY_URL
78+
fi
79+
if [ ! -f "enable-proxy.xsl" ]; then
80+
curl -s -O $ENABLE_XSL_URL
81+
fi
82+
if [ ! -f "disable-proxy.xsl" ]; then
83+
curl -s -O $DISABLE_XSL_URL
84+
fi
85+
}
86+
5387
function install_brew_cask() {
5488
# Install brew and cask
5589
if which brew > /dev/null; then
@@ -396,3 +430,10 @@ function run_setup() {
396430
}
397431

398432
run_setup $@
433+
# Running Proxy Scripts
434+
echo
435+
echo "Pulling proxy scripts from predix-scripts"
436+
get_proxy_scripts
437+
echo
438+
echo "Running verify-proxy.sh"
439+
source verify-proxy.sh

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "local setup",
3-
"version": "1.0.99",
3+
"version": "1.0.100",
44
"private": true,
55
"dependencies": {},
66
"author": "rishabhtulsian"

0 commit comments

Comments
 (0)