refactor(architecture): download url logic for arm architectures

This commit is contained in:
Sannidhya 2025-02-20 02:18:12 +05:30
parent 3c257bb505
commit 6e2f4182fb
No known key found for this signature in database

View file

@ -7,7 +7,7 @@ app_name=zen
literal_name_of_installation_directory=".tarball-installations" literal_name_of_installation_directory=".tarball-installations"
universal_path_for_installation_directory="$HOME/$literal_name_of_installation_directory" universal_path_for_installation_directory="$HOME/$literal_name_of_installation_directory"
app_installation_directory="$universal_path_for_installation_directory/zen" app_installation_directory="$universal_path_for_installation_directory/zen"
official_package_location="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-$os_arch.tar.xz" official_package_location="" # Placeholder for download URL, to be set later
tar_location=$(mktemp /tmp/zen.XXXXXX.tar.xz) tar_location=$(mktemp /tmp/zen.XXXXXX.tar.xz)
open_tar_application_data_location="zen" open_tar_application_data_location="zen"
local_bin_path="$HOME/.local/bin" local_bin_path="$HOME/.local/bin"
@ -25,12 +25,15 @@ case "$os_arch" in
x86_64) echo "64-bit (Intel/AMD) architecture identified!" ;; x86_64) echo "64-bit (Intel/AMD) architecture identified!" ;;
aarch64|arm64) aarch64|arm64)
echo "64-bit ARM architecture identified!" echo "64-bit ARM architecture identified!"
official_package_location="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-aarch64.tar.xz" ;; os_arch="aarch64" ;;
*) *)
echo "Zen doesn't support this architecture: $os_arch" echo "Zen doesn't support this architecture: $os_arch"
exit 1 ;; exit 1 ;;
esac esac
# Set the official package download URL
official_package_location="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-$os_arch.tar.xz"
echo "Downloading the latest package" echo "Downloading the latest package"
curl -L --progress-bar -o $tar_location $official_package_location curl -L --progress-bar -o $tar_location $official_package_location
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then