Fixing bug in stocks for OSX, only create python function conditionally

This commit is contained in:
Alex Epstein 2017-07-24 13:53:30 -04:00
parent 17ce61c349
commit ac472d04ae
1 changed files with 10 additions and 9 deletions

View File

@ -33,14 +33,15 @@ getConfiguredPython()
fi
}
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()
@ -164,7 +165,7 @@ usage()
echo " stocks Tesla"
}
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