v2fly / fhs-install-v2ray

Bash script for installing V2Ray in operating systems such as Debian / CentOS / Fedora / openSUSE that support systemd
GNU General Public License v3.0
6.28k stars 1.45k forks source link

Always use latest script;Rm useless configuration file;...etc. Chores #152

Closed IceCodeNew closed 4 years ago

github-actions[bot] commented 4 years ago

sh-checker report

shellcheck output ``` In install-release.sh line 233: if ! curl ${PROXY} -sS -H "Accept: application/vnd.github.v3+json" -o "$TMP_FILE" 'https://api.github.com/repos/v2fly/v2ray-core/releases/latest'; then ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if ! curl "${PROXY}" -sS -H "Accept: application/vnd.github.v3+json" -o "$TMP_FILE" 'https://api.github.com/repos/v2fly/v2ray-core/releases/latest'; then In install-release.sh line 247: CURRENT_VERSIONSION_NUMBER="$(echo "${CURRENT_VERSION#v}" | sed 's/-.*//')" ^-- SC2001: See if you can use ${variable//search/replace} instead. In install-release.sh line 276: if ! curl ${PROXY} -R -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK"; then ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if ! curl "${PROXY}" -R -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK"; then In install-release.sh line 281: if ! curl ${PROXY} -sSR -H 'Cache-Control: no-cache' -o "$ZIP_FILE.dgst" "$DOWNLOAD_LINK.dgst"; then ^------^ SC2086: Double quote to prevent globbing and word splitting. Did you mean: if ! curl "${PROXY}" -sSR -H 'Cache-Control: no-cache' -o "$ZIP_FILE.dgst" "$DOWNLOAD_LINK.dgst"; then In install-release.sh line 332: if [[ -z "$JSONS_PATH" ]] && [[ ! -d "$JSON_PATH" ]]; then ^---------^ SC2153: Possible misspelling: JSONS_PATH may not be assigned, but JSON_PATH is. In install-release.sh line 349: if [[ -n "$(id nobody | grep nogroup)" ]]; then ^-- SC2143: Use grep -q instead of comparing output with [ -n .. ]. In install-release.sh line 397: if [[ x"${check_all_service_files:0:1}" = x'y' ]]; then ^----------------------------^ SC2154: check_all_service_files is referenced but not assigned. In install-release.sh line 424: if [[ "$?" -ne '0' ]]; then ^--^ SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In install-release.sh line 434: if [[ "$?" -eq '0' ]]; then ^--^ SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In install-release.sh line 447: if [[ -n "$(systemctl list-unit-files | grep 'v2ray')" ]]; then ^-- SC2143: Use grep -q instead of comparing output with [ -n .. ]. In install-release.sh line 458: if [[ "$?" -ne '0' ]]; then ^--^ SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In install-release.sh line 548: if [[ -n "$(systemctl list-unit-files | grep 'v2ray')" ]]; then ^-- SC2143: Use grep -q instead of comparing output with [ -n .. ]. For more information: https://www.shellcheck.net/wiki/SC2153 -- Possible misspelling: JSONS_PATH ... https://www.shellcheck.net/wiki/SC2154 -- check_all_service_files is refere... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... ```

The files above have some shellcheck issues

shfmt output ``` No errors or shfmt is disabled ```

The files above have some formatting problems, you can use shfmt -w to fix them

To get the full details about this job

kslr commented 4 years ago

不要在快速命令加 header,这会影响传播能力。

kslr commented 4 years ago

保持简单,实现功能就可以了。 这里的改变需要在其他地方都做出相应的配合和宣传工作,我希望你能理解这不是一个玩具,需要和其他人沟通合作。

IceCodeNew commented 4 years ago

不要在快速命令加 header,这会影响传播能力。

什么叫传播能力啊? 我主要是观察到国内的测试机好像直接 bash 接网址的时候拿不到最新的脚本内容,所以考虑加这个 header 来减少问题。

kslr commented 4 years ago

一键脚本作为入门的第一步,会被各路渠道转载介绍,保持简单和快速记忆我觉得是非常有必要的,现在也在推进简化 url 的工作。 缓存的问题我不清楚,但我们得研究下值得付出这个代价吗 会出现频繁的变化需要快速更新吗

IceCodeNew commented 4 years ago

一键脚本作为入门的第一步,会被各路渠道转载介绍,保持简单和快速记忆我觉得是非常有必要的,现在也在推进简化 url 的工作。 缓存的问题我不清楚,但我们得研究下值得付出这个代价吗 会出现频繁的变化需要快速更新吗

我觉得你说的有道理,虽然我觉得这里的场景大家都是直接复制,但确实命令越简单会越好,我会 revert 相关的提交。