mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2025-01-08 12:07:37 +08:00
fixed curl check issue
This commit is contained in:
parent
683542c41f
commit
5422d45ff2
@ -113,16 +113,18 @@ if [ ! -f "${filepath}" ]; then
|
||||
fi
|
||||
githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${fileurl}"
|
||||
echo -e " fetching ${filename}...\c"
|
||||
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"
|
||||
if [ "$(command -v curl)" ]||[ "$(which curl >/dev/null 2>&1)" ]||[ -f "/usr/bin/curl" ]||[ -f "/bin/curl" ]; then
|
||||
:
|
||||
else
|
||||
echo -e "\e[0;31mFAIL\e[0m\n"
|
||||
echo "Curl is not installed!"
|
||||
echo -e ""
|
||||
exit
|
||||
fi
|
||||
CURL=$(curl --fail -o "${filepath}" "${githuburl}" 2>&1)
|
||||
exit
|
||||
fi
|
||||
curl=$(curl --fail -o "${filepath}" "${githuburl}" 2>&1)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "\e[0;31mFAIL\e[0m\n"
|
||||
echo " $CURL"|grep "curl:"
|
||||
echo " ${curl}"|grep "curl:"
|
||||
echo -e "${githuburl}\n"
|
||||
exit
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user