@@ -16,44 +16,10 @@ desktop_in_local_applications="$local_application_path/$app_name.desktop"
1616icon_path=" $app_installation_directory /browser/chrome/icons/default/default128.png"
1717executable_path=$app_installation_directory /zen
1818
19- echo -e " Welcome to Zen tarball installer!\n"
20- sleep 1
21-
22- echo " What would you like to do?"
23- echo " 1) Install/Update Zen Browser"
24- echo " 2) Uninstall Zen Browser"
25- echo " 3) Exit"
26- read -rn1 -p " Enter your choice [1/2/3]: " choice
27- echo
28-
29- case $choice in
30- 1)
31- parseTwilight " $@ "
32- install
33- ;;
34- 2)
35- uninstall
36- ;;
37- 3)
38- echo " Exiting... Bye! 🐷"
39- exit 0
40- ;;
41- * )
42- echo " Invalid choice. Exiting."
43- exit 1
44- ;;
45- esac
46-
4719install () {
4820 echo " We're installing Zen, just chill and wait for the installation to complete!\n"
4921 echo " Downloading the latest package"
5022 curl -L --progress-bar -o $tar_location $official_package_location
51- if [ $? -eq 0 ]; then
52- echo OK
53- else
54- echo " Download failed. Curl not found or not installed"
55- exit
56- fi
5723
5824 echo " Extracting Zen Browser..."
5925 tar -xvJf $tar_location
@@ -127,7 +93,7 @@ install() {
12793}
12894
12995parseTwilight () {
130- if [ " $1 " == " --twilight" ]; then
96+ if [ " ${1 :- } " == " --twilight" ]; then
13197 official_package_location=" https://github.com/zen-browser/desktop/releases/download/twilight/zen.linux-x86_64.tar.xz"
13298 echo " You're currently in Twilight mode, this means you're downloading the latest experimental features and updates."
13399 fi
@@ -168,3 +134,31 @@ uninstall() {
168134 echo " Zen Browser has been uninstalled."
169135 exit 0
170136}
137+
138+ echo -e " Welcome to Zen tarball installer!\n"
139+ sleep 1
140+
141+ echo " What would you like to do?"
142+ echo " 1) Install/Update Zen Browser"
143+ echo " 2) Uninstall Zen Browser"
144+ echo " 3) Exit"
145+ read -rn1 -p " Enter your choice [1/2/3]: " choice
146+ echo
147+
148+ case $choice in
149+ 1)
150+ parseTwilight " $@ "
151+ install
152+ ;;
153+ 2)
154+ uninstall
155+ ;;
156+ 3)
157+ echo " Exiting... Bye! 🐷"
158+ exit 0
159+ ;;
160+ * )
161+ echo " Invalid choice. Exiting."
162+ exit 1
163+ ;;
164+ esac
0 commit comments