mirror of
https://github.com/alexanderepstein/Bash-Snippets
synced 2018-11-08 02:59:35 +01:00
Not using getConfiguredPython on OSX
This commit is contained in:
parent
ac472d04ae
commit
3f40fdcae2
@ -34,13 +34,15 @@ getConfiguredPython()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
python()
|
if [[ $(uname) != "Darwin" ]];then
|
||||||
{
|
python()
|
||||||
case "$configuredPython" in
|
{
|
||||||
python2) python2 "$@";;
|
case "$configuredPython" in
|
||||||
python) python "$@";;
|
python2) python2 "$@";;
|
||||||
esac
|
python) python "$@";;
|
||||||
}
|
esac
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
## Allows to call the users configured client without if statements everywhere
|
## Allows to call the users configured client without if statements everywhere
|
||||||
httpGet()
|
httpGet()
|
||||||
@ -154,7 +156,7 @@ usage()
|
|||||||
echo " movies Inception"
|
echo " movies Inception"
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfiguredPython || exit 1
|
if [[ $(uname) != "Darwin" ]];then getConfiguredPython || exit 1;fi
|
||||||
getConfiguredClient || exit 1
|
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
|
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
|
||||||
|
|
||||||
|
18
short/short
18
short/short
@ -35,13 +35,15 @@ getConfiguredPython()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
python()
|
if [[ $(uname) != "Darwin" ]];then
|
||||||
{
|
python()
|
||||||
case "$configuredPython" in
|
{
|
||||||
python2) python2 "$@";;
|
case "$configuredPython" in
|
||||||
python) python "$@";;
|
python2) python2 "$@";;
|
||||||
esac
|
python) python "$@";;
|
||||||
}
|
esac
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
## Allows to call the users configured client without if statements everywhere
|
## Allows to call the users configured client without if statements everywhere
|
||||||
httpGet()
|
httpGet()
|
||||||
@ -142,7 +144,7 @@ printResults()
|
|||||||
echo "====================================================================="
|
echo "====================================================================="
|
||||||
}
|
}
|
||||||
|
|
||||||
getConfiguredPython || exit 1
|
if [[ $(uname) != "Darwin" ]];then getConfiguredPython || exit 1;fi
|
||||||
getConfiguredClient || exit 1
|
getConfiguredClient || exit 1
|
||||||
checkInternet || exit 1
|
checkInternet || exit 1
|
||||||
|
|
||||||
|
18
taste/taste
18
taste/taste
@ -37,13 +37,15 @@ getConfiguredPython()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
python()
|
if [[ $(uname) != "Darwin" ]];then
|
||||||
{
|
python()
|
||||||
case "$configuredPython" in
|
{
|
||||||
python2) python2 "$@";;
|
case "$configuredPython" in
|
||||||
python) python "$@";;
|
python2) python2 "$@";;
|
||||||
esac
|
python) python "$@";;
|
||||||
}
|
esac
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
## Allows to call the users configured client without if statements everywhere
|
## Allows to call the users configured client without if statements everywhere
|
||||||
httpGet()
|
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"
|
echo "After following all the steps and issues still persist try adding export TASTE_API_KEY manually to your .bash_profile"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
getConfiguredPython || exit 1
|
if [[ $(uname) != "Darwin" ]];then getConfiguredPython || exit 1;fi
|
||||||
getConfiguredClient || exit 1
|
getConfiguredClient || exit 1
|
||||||
checkInternet || exit 1
|
checkInternet || exit 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user