From 51f4b4d37d99df724422c8fb61a18e95adc2a0fd Mon Sep 17 00:00:00 2001 From: predix-adoption-bot Date: Mon, 10 Sep 2018 18:01:07 +0000 Subject: [PATCH] Release 1.0.100 --- setup-mac.sh | 41 +++++++++++++++++++++++++++++++++++++++++ version.json | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/setup-mac.sh b/setup-mac.sh index 526b8c9..01763af 100755 --- a/setup-mac.sh +++ b/setup-mac.sh @@ -33,6 +33,7 @@ function check_internet() { curl "http://github.com" > /dev/null 2>&1 if [ $? -ne 0 ]; then 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" + echo "" exit 1 fi echo "OK" @@ -50,6 +51,39 @@ function check_bash_profile() { prefix_to_path /usr/local/bin } +function get_proxy_scripts() { + VERIFY_PROXY_URL=https://raw.githubusercontent.com/PredixDev/predix-scripts/master/bash/common/proxy/verify-proxy.sh + TOGGLE_PROXY_URL=https://raw.githubusercontent.com/PredixDev/predix-scripts/master/bash/common/proxy/toggle-proxy.sh + ENABLE_XSL_URL=https://raw.githubusercontent.com/PredixDev/predix-scripts/master/bash/common/proxy/enable-proxy.xsl + DISABLE_XSL_URL=https://raw.githubusercontent.com/PredixDev/predix-scripts/master/bash/common/proxy/disable-proxy.xsl + + if [ -f "verify-proxy.sh" ]; then + rm verify-proxy.sh + fi + if [ -f "toggle-proxy.sh" ]; then + rm toggle-proxy.sh + fi + if [ -f "enable-proxy.xsl" ]; then + rm enable-proxy.xsl + fi + if [ -f "disable-proxy.xsl" ]; then + rm disable-proxy.xsl + fi + + if [ ! -f "verify-proxy.sh" ]; then + curl -s -O $VERIFY_PROXY_URL + fi + if [ ! -f "toggle-proxy.sh" ]; then + curl -s -O $TOGGLE_PROXY_URL + fi + if [ ! -f "enable-proxy.xsl" ]; then + curl -s -O $ENABLE_XSL_URL + fi + if [ ! -f "disable-proxy.xsl" ]; then + curl -s -O $DISABLE_XSL_URL + fi +} + function install_brew_cask() { # Install brew and cask if which brew > /dev/null; then @@ -396,3 +430,10 @@ function run_setup() { } run_setup $@ +# Running Proxy Scripts +echo +echo "Pulling proxy scripts from predix-scripts" +get_proxy_scripts +echo +echo "Running verify-proxy.sh" +source verify-proxy.sh diff --git a/version.json b/version.json index 225140f..1fb6805 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "name": "local setup", - "version": "1.0.99", + "version": "1.0.100", "private": true, "dependencies": {}, "author": "rishabhtulsian"