Little try
parent
b37ee5165d
commit
45996c6929
|
@ -215,7 +215,8 @@ getVersion() {
|
||||||
# Get V2Ray release version number
|
# Get V2Ray release version number
|
||||||
TMP_FILE="$(mktemp)"
|
TMP_FILE="$(mktemp)"
|
||||||
# Avoid errors when installing cURL for the first time
|
# Avoid errors when installing cURL for the first time
|
||||||
/usr/bin/curl ${PROXY} -o "$TMP_FILE" https://api.github.com/repos/v2ray/v2ray-core/releases/latest -s
|
installSoftware curl
|
||||||
|
curl ${PROXY} -o "$TMP_FILE" https://api.github.com/repos/v2ray/v2ray-core/releases/latest -s
|
||||||
if [[ "$?" -ne '0' ]]; then
|
if [[ "$?" -ne '0' ]]; then
|
||||||
rm "$TMP_FILE"
|
rm "$TMP_FILE"
|
||||||
echo 'error: Failed to get release list, please check your network.'
|
echo 'error: Failed to get release list, please check your network.'
|
||||||
|
@ -442,7 +443,6 @@ main() {
|
||||||
else
|
else
|
||||||
# Normal way
|
# Normal way
|
||||||
${PACKAGE_MANAGEMENT_UPDATE}
|
${PACKAGE_MANAGEMENT_UPDATE}
|
||||||
installSoftware curl
|
|
||||||
getVersion
|
getVersion
|
||||||
NUMBER="$?"
|
NUMBER="$?"
|
||||||
if [[ "$NUMBER" -eq '0' ]] || [[ "$FORCE" -eq '1' ]] || [[ "$NUMBER" -eq 2 ]]; then
|
if [[ "$NUMBER" -eq '0' ]] || [[ "$FORCE" -eq '1' ]] || [[ "$NUMBER" -eq 2 ]]; then
|
||||||
|
|
Loading…
Reference in New Issue