Merge pull request #459 from hintoz/master

Update _index.en.md
This commit is contained in:
RustDesk 2024-11-02 09:00:45 +08:00 committed by GitHub
commit 0f1c24824a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -210,14 +210,8 @@ rustdesk_cfg="configstring"
################################### Please Do Not Edit Below This Line #########################################
# Check if the script is being run as root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root."
exit 1
fi
# Specify the path to the rustdesk.dmg file
dmg_file="/tmp/rustdesk-1.2.6-x86_64.dmg"
# Root password request for privilege escalation
[ "$UID" -eq 0 ] || exec sudo bash "$0" "$@"
# Specify the mount point for the DMG (temporary directory)
mount_point="/Volumes/RustDesk"
@ -226,9 +220,13 @@ mount_point="/Volumes/RustDesk"
echo "Downloading RustDesk Now"
if [[ $(arch) == 'arm64' ]]; then
curl -L https://github.com/rustdesk/rustdesk/releases/download/1.2.6/rustdesk-1.2.6-aarch64.dmg --output "$dmg_file"
rd_link=$(curl -sL https://github.com/rustdesk/rustdesk/releases/latest | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*/\d{1}.\d{1,2}.\d{1,2}/rustdesk.\d{1}.\d{1,2}.\d{1,2}.aarch64.dmg")
dmg_file=$(echo $rd_link | grep -Eo "rustdesk.\d{1}.\d{1,2}.\d{1,2}.aarch64.dmg")
curl -L "$rd_link" --output "$dmg_file"
else
curl -L https://github.com/rustdesk/rustdesk/releases/download/1.2.6/rustdesk-1.2.6-x86_64.dmg --output "$dmg_file"
rd_link=$(curl -sL https://github.com/rustdesk/rustdesk/releases/latest | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*/\d{1}.\d{1,2}.\d{1,2}/rustdesk.\d{1}.\d{1,2}.\d{1,2}.x86_64.dmg")
dmg_file=$(echo $rd_link | grep -Eo "rustdesk.\d{1}.\d{1,2}.\d{1,2}.x86_64.dmg")
curl -L "$rd_link" --output "$dmg_file"
fi
# Mount the DMG file to the specified mount point