From 38da8a7b93ad74b3f113605ed769f14d90f2a43c Mon Sep 17 00:00:00 2001 From: Dct Mei Date: Sat, 13 Jun 2020 20:44:22 +0800 Subject: [PATCH] style: Canonical code format 1. Regulate two judgments, this will not cause functional changes. 2. Add some supplementary content, mainly for subsequent maintenance. --- README.md | 10 ++++++++++ install-dat-release.sh | 2 +- install-release.sh | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87b50d9..bc2ec71 100644 --- a/README.md +++ b/README.md @@ -31,24 +31,28 @@ installed: /etc/systemd/system/v2ray@.service ### 安裝 cURL ``` +# apt update # apt install curl ``` or ``` +# yum makecache # yum install curl ``` or ``` +# dnf makecache # dnf install curl ``` or ``` +# zypper refresh # zypper install curl ``` @@ -94,3 +98,9 @@ usage: install-release.sh [--remove | --version number | -c | -f | -h | -l | -p] -l, --local Install V2Ray from a local file -p, --proxy Download through a proxy server, e.g., -p http://127.0.0.1:8118 or -p socks5://127.0.0.1:1080 ``` + +## 維護 + +請於 [develop](https://github.com/v2fly/fhs-install-v2ray/tree/develop) 分支進行,以避免對主分支造成破壞。 + +待確定無誤後,兩分支將進行合併。 diff --git a/install-dat-release.sh b/install-dat-release.sh index b866168..6a0c652 100644 --- a/install-dat-release.sh +++ b/install-dat-release.sh @@ -19,7 +19,7 @@ DOWNLOAD_LINK_GEOSITE="https://github.com/v2ray/domain-list-community/releases/l check_if_running_as_root() { # If you want to run as another user, please modify $UID to be owned by this user - if [ $UID != "0" ]; then + if [[ "$UID" -ne '0' ]]; then echo "error: You must run this script as root!" exit 1 fi diff --git a/install-release.sh b/install-release.sh index 341114f..496c4c5 100644 --- a/install-release.sh +++ b/install-release.sh @@ -14,7 +14,7 @@ check_if_running_as_root() { # If you want to run as another user, please modify $UID to be owned by this user - if [ $UID != "0" ]; then + if [[ "$UID" -ne '0' ]]; then echo "error: You must run this script as root!" exit 1 fi