This commit is contained in:
2019-08-22 22:05:54 +08:00
parent a47177b631
commit d038f5e849
2 changed files with 9 additions and 15 deletions

View File

@ -27,7 +27,7 @@ arch() {
;;
"x86") out="386"
;;
*) out=res
*) out=$res
;;
esac
@ -66,6 +66,7 @@ download() {
getLatestVersion() {
local platformValue=`platform`
local archValue=`arch`
if [[ platformValue == "no" ]]; then
echo -e "\nThis operating system is not supported.\n"
@ -75,7 +76,7 @@ getLatestVersion() {
exit 10
fi
local res=$(download -s https://server-0.sercretcore.cn/api/download\?arch=`arch`\&platform=`platform`)
local res=$(download -s https://server-0.sercretcore.cn/api/download\?arch=${archValue}\&platform=${platformValue})
local status=$(echo "${res}" | grepCross '"status":.' | sed 's/"status"://g')
if [[ "${status}" == "1" ]]; then