fix: Useing 'type' instad of 'which', which is more robust
For reference, see: https://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script.
This commit is contained in:
parent
accdcb2f1c
commit
6eb836dd44
@ -10,7 +10,7 @@ TEXT_COLOR="\e[0;35m"
|
|||||||
COLON_COLOR="\e[0;35m"
|
COLON_COLOR="\e[0;35m"
|
||||||
END_COLOR="\e[m"
|
END_COLOR="\e[m"
|
||||||
|
|
||||||
if [[ -x `which curl` ]]; then
|
if $(type curl > /dev/null); then
|
||||||
function quote()
|
function quote()
|
||||||
{
|
{
|
||||||
Q=$(curl -s --connect-timeout 2 "http://www.quotationspage.com/random.php3" | iconv -c -f ISO-8859-1 -t UTF-8 | grep -m 1 "dt ")
|
Q=$(curl -s --connect-timeout 2 "http://www.quotationspage.com/random.php3" | iconv -c -f ISO-8859-1 -t UTF-8 | grep -m 1 "dt ")
|
||||||
|
Loading…
Reference in New Issue
Block a user