From b0bdd31a8763aae76d25e4f6ce7b91228f2f1a55 Mon Sep 17 00:00:00 2001 From: Gun Date: Mon, 28 Oct 2024 19:54:05 +0700 Subject: [PATCH 1/3] Bash script to install native Zen using tar2.bz Bash script to install native Zen using tar2.bz Signed-off-by: Gun --- scripts /install.sh | 116 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 scripts /install.sh diff --git a/scripts /install.sh b/scripts /install.sh new file mode 100644 index 000000000..4f02344c8 --- /dev/null +++ b/scripts /install.sh @@ -0,0 +1,116 @@ +#!/bin/bash + +app_name=zen +literal_name_of_installation_directory=".tarball-installations" +universal_path_for_installation_directory="$HOME/$literal_name_of_installation_directory" +app_installation_directory="$universal_path_for_installation_directory/zen" +official_package_location="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-specific.tar.bz2" +tar_location=$(mktemp /tmp/zen.XXXXXX.tar.bz2) +open_tar_application_data_location="zen" +local_bin_path="$HOME/.local/bin" +local_application_path="$HOME/.local/share/applications" +app_bin_in_local_bin="$local_bin_path/$app_name" +desktop_in_local_applications="$local_application_path/$app_name.desktop" +icon_path="$app_installation_directory/browser/chrome/icons/default/default128.png" +executable_path=$app_installation_directory/zen + +echo "Welcome to Zen tarball installer, just chill and wait for the installation to complete!" + +sleep 1 + +echo "Checking to see if an older installation exists" +if [ -f "$app_bin_in_local_bin" ]; then + echo "Old bin file detected, removing..." + rm "$app_bin_in_local_bin" +fi + +if [ -d "$app_installation_directory" ]; then + echo "Old app files are found, removing..." + rm -rf "$app_installation_directory" +fi + +if [ -f "$desktop_in_local_applications" ]; then + echo "Old app files are found, removing..." + rm "$desktop_in_local_applications" +fi + +sleep 1 + +echo "Installing the latest package" +curl -L -o $tar_location $official_package_location +if [ $? -eq 0 ]; then + echo OK +else + echo "Installation failed. Curl not found or not installed" + exit +fi + +tar -xvjf $tar_location + +echo "Installed and untarred successfully" + +if [ ! -d $universal_path_for_installation_directory ]; then + echo "Creating the $universal_path_for_installation_directory directory for installation" + mkdir $universal_path_for_installation_directory +fi + +mv $open_tar_application_data_location $app_installation_directory + +echo "Zen successfully moved to your safe place!" + +rm $tar_location + +if [ ! -d $local_bin_path ]; then + echo "$local_bin_path not found, creating it for you" + mkdir $local_bin_path +fi + +touch $app_bin_in_local_bin +chmod u+x $app_bin_in_local_bin +echo "#!/bin/bash +$executable_path" >> $app_bin_in_local_bin + +echo "Created executable for your \$PATH if you ever need" + +if [ ! -d $local_application_path ]; then + echo "Creating the $local_application_path directory for desktop file" + mkdir $local_application_path +fi + + +touch $desktop_in_local_applications +echo " +[Desktop Entry] +Name=Zen +Keywords=web;browser;internet +Exec=$executable_path %u +Icon=$icon_path +Terminal=false +Type=Application +MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; +Categories=Network;WebBrowser; +Actions=new-window;new-private-window;profile-manager-window; +[Desktop Action new-window] +Name=Open a New Window +Exec=$executable_path --new-window %u +[Desktop Action new-private-window] +Name=Open a New Private Window +Exec=$executable_path --private-window %u +[Desktop Action profile-manager-window] +Name=Open the Profile Manager +Exec=$executable_path --ProfileManager +" >> $desktop_in_local_applications + +echo "Created desktop entry successfully" + +sleep 1 + +echo "Installation is successful" + +sleep 1 + +echo "Done, and done, have fun!" + +sleep 1 + +exit 0 From 64af5e19530e27003eab1471f07f7afdf5512bae Mon Sep 17 00:00:00 2001 From: Gun Date: Mon, 28 Oct 2024 20:00:15 +0700 Subject: [PATCH 2/3] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 4ffe63118..e07fb0433 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,9 @@ yay -S zen-browser-avx2-bin ##### Other Linux distributions (AppImage with automated system integration) +- `native` tarball install: +`bash <(curl -s https://raw.githubusercontent.com/zen-browser/desktop/dev/scripts/install.sh)` + - `zsync` is required for the Update feature of the script below ```sh From 6895b2cc2057bb3d08ccd875ca0c679a64889118 Mon Sep 17 00:00:00 2001 From: Gun <6913739+GunGunGun@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:16:53 +0700 Subject: [PATCH 3/3] Delete scripts /install.sh --- scripts /install.sh | 116 ------------------------------------------- 1 file changed, 116 deletions(-) delete mode 100644 scripts /install.sh diff --git a/scripts /install.sh b/scripts /install.sh deleted file mode 100644 index 4f02344c8..000000000 --- a/scripts /install.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash - -app_name=zen -literal_name_of_installation_directory=".tarball-installations" -universal_path_for_installation_directory="$HOME/$literal_name_of_installation_directory" -app_installation_directory="$universal_path_for_installation_directory/zen" -official_package_location="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-specific.tar.bz2" -tar_location=$(mktemp /tmp/zen.XXXXXX.tar.bz2) -open_tar_application_data_location="zen" -local_bin_path="$HOME/.local/bin" -local_application_path="$HOME/.local/share/applications" -app_bin_in_local_bin="$local_bin_path/$app_name" -desktop_in_local_applications="$local_application_path/$app_name.desktop" -icon_path="$app_installation_directory/browser/chrome/icons/default/default128.png" -executable_path=$app_installation_directory/zen - -echo "Welcome to Zen tarball installer, just chill and wait for the installation to complete!" - -sleep 1 - -echo "Checking to see if an older installation exists" -if [ -f "$app_bin_in_local_bin" ]; then - echo "Old bin file detected, removing..." - rm "$app_bin_in_local_bin" -fi - -if [ -d "$app_installation_directory" ]; then - echo "Old app files are found, removing..." - rm -rf "$app_installation_directory" -fi - -if [ -f "$desktop_in_local_applications" ]; then - echo "Old app files are found, removing..." - rm "$desktop_in_local_applications" -fi - -sleep 1 - -echo "Installing the latest package" -curl -L -o $tar_location $official_package_location -if [ $? -eq 0 ]; then - echo OK -else - echo "Installation failed. Curl not found or not installed" - exit -fi - -tar -xvjf $tar_location - -echo "Installed and untarred successfully" - -if [ ! -d $universal_path_for_installation_directory ]; then - echo "Creating the $universal_path_for_installation_directory directory for installation" - mkdir $universal_path_for_installation_directory -fi - -mv $open_tar_application_data_location $app_installation_directory - -echo "Zen successfully moved to your safe place!" - -rm $tar_location - -if [ ! -d $local_bin_path ]; then - echo "$local_bin_path not found, creating it for you" - mkdir $local_bin_path -fi - -touch $app_bin_in_local_bin -chmod u+x $app_bin_in_local_bin -echo "#!/bin/bash -$executable_path" >> $app_bin_in_local_bin - -echo "Created executable for your \$PATH if you ever need" - -if [ ! -d $local_application_path ]; then - echo "Creating the $local_application_path directory for desktop file" - mkdir $local_application_path -fi - - -touch $desktop_in_local_applications -echo " -[Desktop Entry] -Name=Zen -Keywords=web;browser;internet -Exec=$executable_path %u -Icon=$icon_path -Terminal=false -Type=Application -MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; -Categories=Network;WebBrowser; -Actions=new-window;new-private-window;profile-manager-window; -[Desktop Action new-window] -Name=Open a New Window -Exec=$executable_path --new-window %u -[Desktop Action new-private-window] -Name=Open a New Private Window -Exec=$executable_path --private-window %u -[Desktop Action profile-manager-window] -Name=Open the Profile Manager -Exec=$executable_path --ProfileManager -" >> $desktop_in_local_applications - -echo "Created desktop entry successfully" - -sleep 1 - -echo "Installation is successful" - -sleep 1 - -echo "Done, and done, have fun!" - -sleep 1 - -exit 0