Browse Source

fixed curl check issue

pull/568/head
Daniel Gibbs 9 years ago
parent
commit
5422d45ff2
  1. 14
      CounterStrikeGlobalOffensive/csgoserver

14
CounterStrikeGlobalOffensive/csgoserver

@ -113,16 +113,18 @@ if [ ! -f "${filepath}" ]; then
fi fi
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${fileurl}" githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${fileurl}"
echo -e " fetching ${filename}...\c" echo -e " fetching ${filename}...\c"
if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then
echo -e "\e[0;31mFAIL\e[0m\n" :
else
echo -e "\e[0;31mFAIL\e[0m\n"
echo "Curl is not installed!" echo "Curl is not installed!"
echo -e "" echo -e ""
exit exit
fi fi
CURL=$(curl --fail -o "${filepath}" "${githuburl}" 2>&1) curl=$(curl --fail -o "${filepath}" "${githuburl}" 2>&1)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo -e "\e[0;31mFAIL\e[0m\n" echo -e "\e[0;31mFAIL\e[0m\n"
echo " $CURL"|grep "curl:" echo " ${curl}"|grep "curl:"
echo -e "${githuburl}\n" echo -e "${githuburl}\n"
exit exit
else else

Loading…
Cancel
Save