Merge pull request #106 from xiagw/install-release-fix3
commit
bd79b270d3
|
@ -299,7 +299,6 @@ get_version() {
|
||||||
}
|
}
|
||||||
|
|
||||||
download_v2ray() {
|
download_v2ray() {
|
||||||
"mkdir" -p "$TMP_DIRECTORY"
|
|
||||||
DOWNLOAD_LINK="https://github.com/v2fly/v2ray-core/releases/download/$RELEASE_VERSION/v2ray-linux-$MACHINE.zip"
|
DOWNLOAD_LINK="https://github.com/v2fly/v2ray-core/releases/download/$RELEASE_VERSION/v2ray-linux-$MACHINE.zip"
|
||||||
echo "Downloading V2Ray archive: $DOWNLOAD_LINK"
|
echo "Downloading V2Ray archive: $DOWNLOAD_LINK"
|
||||||
if ! "curl" ${PROXY} -L -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK"; then
|
if ! "curl" ${PROXY} -L -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK"; then
|
||||||
|
@ -488,7 +487,7 @@ main() {
|
||||||
[[ "$REMOVE" -eq '1' ]] && remove_v2ray
|
[[ "$REMOVE" -eq '1' ]] && remove_v2ray
|
||||||
|
|
||||||
# Two very important variables
|
# Two very important variables
|
||||||
TMP_DIRECTORY="$(mktemp -du)"
|
TMP_DIRECTORY="$(mktemp -d)"
|
||||||
ZIP_FILE="${TMP_DIRECTORY}/v2ray-linux-$MACHINE.zip"
|
ZIP_FILE="${TMP_DIRECTORY}/v2ray-linux-$MACHINE.zip"
|
||||||
|
|
||||||
# Install V2Ray from a local file, but still need to make sure the network is available
|
# Install V2Ray from a local file, but still need to make sure the network is available
|
||||||
|
@ -497,7 +496,6 @@ main() {
|
||||||
echo -n 'warn: Please make sure the file is valid because we cannot confirm it. (Press any key) ...'
|
echo -n 'warn: Please make sure the file is valid because we cannot confirm it. (Press any key) ...'
|
||||||
read
|
read
|
||||||
install_software unzip
|
install_software unzip
|
||||||
"mkdir" -p "$TMP_DIRECTORY"
|
|
||||||
decompression "$LOCAL_FILE"
|
decompression "$LOCAL_FILE"
|
||||||
else
|
else
|
||||||
# Normal way
|
# Normal way
|
||||||
|
|
Loading…
Reference in New Issue