From 3f40fdcae2428ba3bc4cae789d4b0dce8c656ca6 Mon Sep 17 00:00:00 2001 From: Alex Epstein Date: Mon, 24 Jul 2017 15:02:30 -0400 Subject: [PATCH] Not using getConfiguredPython on OSX --- movies/movies | 18 ++++++++++-------- short/short | 18 ++++++++++-------- taste/taste | 18 ++++++++++-------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/movies/movies b/movies/movies index f581b65..0512490 100755 --- a/movies/movies +++ b/movies/movies @@ -34,13 +34,15 @@ getConfiguredPython() } -python() -{ - case "$configuredPython" in - python2) python2 "$@";; - python) python "$@";; - esac -} +if [[ $(uname) != "Darwin" ]];then + python() + { + case "$configuredPython" in + python2) python2 "$@";; + python) python "$@";; + esac + } +fi ## Allows to call the users configured client without if statements everywhere httpGet() @@ -154,7 +156,7 @@ usage() echo " movies Inception" } -getConfiguredPython || exit 1 +if [[ $(uname) != "Darwin" ]];then getConfiguredPython || exit 1;fi getConfiguredClient || exit 1 checkInternet || exit 1 # check if we have a valid internet connection if this isnt true the rest of the script will not work so stop here diff --git a/short/short b/short/short index 9242809..5f4b6b7 100755 --- a/short/short +++ b/short/short @@ -35,13 +35,15 @@ getConfiguredPython() } -python() -{ - case "$configuredPython" in - python2) python2 "$@";; - python) python "$@";; - esac -} +if [[ $(uname) != "Darwin" ]];then + python() + { + case "$configuredPython" in + python2) python2 "$@";; + python) python "$@";; + esac + } +fi ## Allows to call the users configured client without if statements everywhere httpGet() @@ -142,7 +144,7 @@ printResults() echo "=====================================================================" } -getConfiguredPython || exit 1 +if [[ $(uname) != "Darwin" ]];then getConfiguredPython || exit 1;fi getConfiguredClient || exit 1 checkInternet || exit 1 diff --git a/taste/taste b/taste/taste index 90e6551..1ec7b8d 100755 --- a/taste/taste +++ b/taste/taste @@ -37,13 +37,15 @@ getConfiguredPython() } -python() -{ - case "$configuredPython" in - python2) python2 "$@";; - python) python "$@";; - esac -} +if [[ $(uname) != "Darwin" ]];then + python() + { + case "$configuredPython" in + python2) python2 "$@";; + python) python "$@";; + esac + } +fi ## Allows to call the users configured client without if statements everywhere httpGet() @@ -205,7 +207,7 @@ if [[ $apiKey == "" ]];then echo "After following all the steps and issues still persist try adding export TASTE_API_KEY manually to your .bash_profile" exit 1 fi -getConfiguredPython || exit 1 +if [[ $(uname) != "Darwin" ]];then getConfiguredPython || exit 1;fi getConfiguredClient || exit 1 checkInternet || exit 1