@@ -16,44 +16,10 @@ desktop_in_local_applications="$local_application_path/$app_name.desktop"
16
16
icon_path=" $app_installation_directory /browser/chrome/icons/default/default128.png"
17
17
executable_path=$app_installation_directory /zen
18
18
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
-
47
19
install () {
48
20
echo " We're installing Zen, just chill and wait for the installation to complete!\n"
49
21
echo " Downloading the latest package"
50
22
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
57
23
58
24
echo " Extracting Zen Browser..."
59
25
tar -xvJf $tar_location
@@ -127,7 +93,7 @@ install() {
127
93
}
128
94
129
95
parseTwilight () {
130
- if [ " $1 " == " --twilight" ]; then
96
+ if [ " ${1 :- } " == " --twilight" ]; then
131
97
official_package_location=" https://github.com/zen-browser/desktop/releases/download/twilight/zen.linux-x86_64.tar.xz"
132
98
echo " You're currently in Twilight mode, this means you're downloading the latest experimental features and updates."
133
99
fi
@@ -168,3 +134,31 @@ uninstall() {
168
134
echo " Zen Browser has been uninstalled."
169
135
exit 0
170
136
}
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