mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-06-21 02:08:12 +02:00
commit
0f1c24824a
@ -210,14 +210,8 @@ rustdesk_cfg="configstring"
|
|||||||
|
|
||||||
################################### Please Do Not Edit Below This Line #########################################
|
################################### Please Do Not Edit Below This Line #########################################
|
||||||
|
|
||||||
# Check if the script is being run as root
|
# Root password request for privilege escalation
|
||||||
if [[ $EUID -ne 0 ]]; then
|
[ "$UID" -eq 0 ] || exec sudo bash "$0" "$@"
|
||||||
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"
|
|
||||||
|
|
||||||
# Specify the mount point for the DMG (temporary directory)
|
# Specify the mount point for the DMG (temporary directory)
|
||||||
mount_point="/Volumes/RustDesk"
|
mount_point="/Volumes/RustDesk"
|
||||||
@ -226,9 +220,13 @@ mount_point="/Volumes/RustDesk"
|
|||||||
echo "Downloading RustDesk Now"
|
echo "Downloading RustDesk Now"
|
||||||
|
|
||||||
if [[ $(arch) == 'arm64' ]]; then
|
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
|
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
|
fi
|
||||||
|
|
||||||
# Mount the DMG file to the specified mount point
|
# Mount the DMG file to the specified mount point
|
||||||
|
Loading…
x
Reference in New Issue
Block a user