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

View File

@ -2,23 +2,16 @@
## Guide ## Guide
### Linux、FreeBSD、Darwin(Mac OS) ### Linux、Darwin(Mac OS)
```shell
source <(curl -sL https://git.io/fj8OJ)
```
To **install** or **run** dc-agent, you can use the [install script][2] using cURL: To **install** or **run** dc-agent, you can use the [install script][2] using cURL:
```sh ```sh
curl -o- 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
or Wget: # sudo chmod +x setup.sh
# sudo ./setup.sh
```sh
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
``` ```
### Windows ### Windows

View File

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