Skip to content

Commit

Permalink
Release 1.0.100
Browse files Browse the repository at this point in the history
  • Loading branch information
predix-adoption-bot committed Sep 10, 2018
1 parent c8deac2 commit 51f4b4d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions setup-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "local setup",
"version": "1.0.99",
"version": "1.0.100",
"private": true,
"dependencies": {},
"author": "rishabhtulsian"
Expand Down

0 comments on commit 51f4b4d

Please sign in to comment.