fix bug
This commit is contained in:
parent
a47177b631
commit
d038f5e849
19
README.md
19
README.md
@ -2,23 +2,16 @@
|
||||
|
||||
## Guide
|
||||
|
||||
### Linux、FreeBSD、Darwin(Mac OS)
|
||||
|
||||
```shell
|
||||
source <(curl -sL https://git.io/fj8OJ)
|
||||
|
||||
```
|
||||
### Linux、Darwin(Mac OS)
|
||||
|
||||
To **install** or **run** dc-agent, you can use the [install script][2] using cURL:
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
||||
```
|
||||
|
||||
or Wget:
|
||||
|
||||
```sh
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
||||
curl -O https://y-bi.top/setup.sh && sudo chmod +x setup.sh && ./setup.sh
|
||||
# Or
|
||||
# wget https://y-bi.top/setup.sh
|
||||
# sudo chmod +x setup.sh
|
||||
# sudo ./setup.sh
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
5
setup.sh
5
setup.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user