-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.sh
executable file
·1700 lines (1644 loc) · 65 KB
/
main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# 2.4-unstable-akane
# This really took some time
#
# early function Library
function msg () {
# Standard
echo "$1"
}
function msg-fl () {
# Same as standard but accepts - string but as one liner only , like -ne
echo $1 "$2"
}
function barrier () {
msg " "
msg "=============================================="
msg " "
}
function datetime () {
# Just VERBOSE stuff
MONTH_DATE_YEAR=$(date +%m-%d-%y)
TIMECOUNT=$(date +%T)
msg "$MONTH_DATE_YEAR $TIMECOUNT"
}
# Variable loading
VERSION_ID="2.4-unstable-akane"
MAIN="PRoot-distro-tui-u"
# COLORS!
# setaf - foreground
# setab - background
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
BLUE=$(tput setaf 4)
MAGENTA=$(tput setaf 5)
CYAN=$(tput setaf 6)
WHITE=$(tput setaf 7)
RESET=$(tput sgr0)
# TXT
BOLD=$(tput bold)
ULINE=$(tput smul)
# CURSORS
CIVIS=$(tput civis)
CNORM=$(tput cnorm)
# Changeable Variable
TIMER=0
P_SH="/data/data/com.termux/files/usr/etc/proot-distro"
P_DSTS="/data/data/com.termux/files/usr/var/lib/proot-distro"
P_DSTS_INST="/data/data/com.termux/files/usr/var/lib/proot-distro/installed-rootfs"
# Checker
clear
barrier
msg " Checking Packages"
barrier
package=("dialog" "tput" "proot" "proot-distro" "fakeroot")
for pkg in "${package[@]}" ; do
msg "[ ${CYAN}Checking${RESET} ] : ${BOLD}$(datetime)${RESET}${CNORM} : Checking if the package $pkg is Present in your Termux session."
sleep 1
path=$(command -v "$pkg" 2>/dev/null)
if [ -n "$path" ]; then
msg "[ ${GREEN}${BOLD}PRESENT${RESET}${CNROM} ] : ${BOLD}$(datetime)${RESET}${CNORM} : Package $pkg exists, Located at $path"
else
msg "[ ${RED}${BOLD}NOT INSTALLED${RESET}${CNORM} ] : ${BOLD}$(datetime)${RESET}${CNORM} : Package $pkg does not exist, please install it via apt..."
barrier
sleep 3
exit 1
fi
done
clear
## PREPARATION
function infobox () {
dialog --backtitle "$1" --title "$2" --infobox "$3" 0 0
}
function msgbox () {
dialog --backtitle "$1" --title "$2" --msgbox "$3" 0 0
}
function yesno () {
dialog --backtitle "$1" --title "$2" --yes-label "$3" --no-label "$4" --yesno "$5" 0 0
}
function gen () {
touch .i
}
function check_info_dev () {
# Check your device info
msg "\nName of the user: $(whoami)\n"
msg "Device Machine Architecture: $(uname -m)\n"
msg "Device Operating System: $(uname -o)\n"
}
function errorlog () {
if [ "$4" == "-nc" ]; then
msg " "
else
clear
fi
barrier
msg "${RED}ERROR${CNORM}${RESET}"
barrier
msg "[${BOLD}${RED}ERROR${CNORM}${RESET}] : ${BOLD}$(datetime)${CNORM}${RESET} : ERROR: $1 : Failed Task Job: $2 : Reverting to Menu in $3 seconds..."
msg "[${CYAN}NOTE${CNORM}${RESET}] : ${BOLD}$(datetime)${CNORM}${RESET} : Please Report the issue please"
barrier
VR="$2"
sleep $3
menu "$VR"
}
function distrocheck () {
# This function is not implemented, maybe in senko rel
ARC=$1
if [ -d $P_DSTS/$ARC ]; then
msg "\n$ARC INSTALLED AND PRESENT IN:\n\n$ARC"
else
msg "Not installed"
fi
}
function proot_call () {
clear
msg "Pay Attention to the Terminal since this process is verbose"
msg "Starting in 5 Seconds"
sleep 5
if [ "$1" == "--install" ]; then
barrier
msg "INSTALLING $2"
barrier
msg " "
msg "Installing Specified Distro: ${CYAN}${BOLD}$2${RESET}${CNORM}"
barrier
msg "Calling PRoot-distro"
barrier
msg "LOG: "
msg " "
sleep 3
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} :[ ${BOLD}STATUS${CNORM}${RESET} ] : Calling PRoot-distro to install the following $2"
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}VERBOSE${CNORM}${RESET} ] : proot-distro install $2 -> SEND"
barrier
proot-distro install $2
FETCH=$?
if [ $FETCH -eq 0 ]; then
barrier
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}${GREEN}INSPECT${CNORM}${RESET} ] : Checking Distro Existence in the system..."
sleep 2
if [ -d $P_DSTS_INST/"$2" ]; then
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}${GREEN}DONE${CNORM}${RESET} ] : $2 Found in: $P_DSTS_INST/$2"
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}VERBOSE${CNORM}${RESET} ] : Ending Process..."
barrier
read -n 1 -t 100 -p "PRESS ANY KEY TO END FUNCTION" RPS
if [[ -n $RPS ]]; then
menu
else
menu
fi
else
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}${RED}ERROR${CNORM}${RESET} ] : Could Not find Distro that you want to install..."
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}VERBOSE${CNORM}${RESET} ] : Ending Process..."
sleep 3
read -n 1 -t 100 -p "PRESS ANY KEY TO END FUNCTION" RPS
errorlog "ins_ $2 _dir" "Install $2 failed due to Failure to find the directory" 5 -nc
fi
else
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}${RED}ERROR${CNORM}${RESET} ] : PRoot-distro Reported an ERROR, Probably an issue during fetching of $2, Please Restart your termux."
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}VERBOSE${CNORM}${RESET} ] : Ending Process..."
sleep 3
read -n 1 -t 100 -p "PRESS ANY KEY TO END FUNCTION" RPS
errorlog "ins_ $2 _dir" "Install $2 failed due to Issues at import or Internet Connection" 5 -nc
fi
fi
if [ "$1" == "--run" ]; then
barrier
msg "RUNNING $2"
barrier
msg " "
msg "Running Specified Distro: ${CYAN}${BOLD}$2${RESET}${CNORM}"
barrier
msg "Calling PRoot-distro"
barrier
msg "LOG: "
msg " "
sleep 3
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}STATUS${CNORM}${RESET} ] : Calling PRoot-distro to run the following $2"
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}VERBOSE${CNORM}${RESET} ] : proot-distro login $2 $3 -> SEND"
barrier
proot-distro login $2 $3
FETCH=$?
if [ $FETCH -eq "0" ]; then
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}STATUS${CNORM}${RESET} ] : Exit Detected..."
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}VERBOSE${CNORM}${RESET} ] : Exiting Process"
barrier
sleep 5
menu
else
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}${RED}ERROR${CNORM}${RESET} ] : PRoot-distro Reported an ERROR, Probably an issue during fetching of $2 or $3, Please refer to Official Termux Documentations, or unless you are using arch based distro which it usually set exit as 1 by logging out"
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}VERBOSE${CNORM}${RESET} ] : Ending Process..."
sleep 3
read -n 1 -t 100 -p "PRESS ANY KEY TO END FUNCTION" RPS
errorlog "str_$2 _dir" "Logging in to $2 failed due to Issues at Launch, potentially a $3 EOR" 5 -nc
fi
fi
if [ "$1" == "--remove" ]; then
barrier
msg "PRoot-distro Cleaner"
barrier
msg "Preparing to Remove..."
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}STATUS${CNORM}${RESET} ] : Preparing to remove: $2, from $P_DSTS/$2"
msg "[${YELLOW}${BOLD}PRoot-Distro Ensure Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}CHECK${CNORM}${RESET} ] : Checking the string operation request..."
# FIX: Archlinux tends to ignore rm requests, so the solution is to force remove it to proot-distro
if [ "$2" == "archlinux" ] || [ "$2" == "manjaro-aarch64" ] ; then
msg "[${RED}${BOLD}PRoot-Distro REDIR${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}FALLBACK${CNORM}${RESET} ] : $2 Detected to be removed. Fallback to request proot-distro to remove files associated with $2..."
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${CNORM}${RESET}]: ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}MESSAGE${CNORM}${RESET} ] : Some Distros' content are tend to be stuck at read-only, this mitigation helps completely remove the distro"
sleep 5
barrier
proot-distro remove $2
# This area checks if it still exists...
if [ ! -d "$P_DSTS_INST/$2" ]; then
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${GREEN}${BOLD}COMPLETE${CNORM}${RESET} ] : Distro $2 Removed..."
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}STATUS${CNORM}${RESET} ] : Exiting Process"
sleep 3
read -n 1 -t 100 -p "PRESS ANY KEY TO END FUNCTION" RPS
menu
else
msg "[${GREEN}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${RED}${BOLD}ERROR${RESET}${CNORM} ] : PRoot-distro Failed to delete $2, please restart termux and try again, or please forcefully clear all data, if strictly necessary..."
read -n 1 -t 100 -p "PRESS ANY KEY TO END FUNCTION" RPS
errorlog "rm_$2 m2" "$(datetime) : Removing $2 from $P_DSTS_INST with the call failed, there is still a reminant of $2 in the directory..." 5 -nc
fi
fi
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}VERBOSE${CNORM}${RESET} ] : rm -rfv $P_DSTS/$2 -> SEND"
sleep 2
rm -rfv ${P_DSTS_INST:?}/$2
if [ ! -d "$P_DSTS_INST/$2" ]; then
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${GREEN}${BOLD}COMPLETE${CNORM}${RESET} ] : Distro $2 Removed..."
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}STATUS${CNORM}${RESET} ] : Exiting Process"
read -n 1 -t 100 -p "PRESS ANY KEY TO END FUNCTION" RPS
menu
else
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${RED}${BOLD}ERROR${CNORM}${RESET} ] : Could not Remove the distro, Permission Error to execute..."
msg "[${YELLOW}${BOLD}PRoot-Distro Call Function${RESET}${CNORM}] : ${BOLD}$(datetime)${CNORM}${RESET} : [ ${BOLD}MSG${CNORM}${RESET} ] : PLEASE MAKE SURE THAT PERMISSIONS ARE SET TO r+w"
sleep 3
read -n 1 -t 100 -p "PRESS ANY KEY TO END FUNCTION" RPS
errorlog "rm_ $2 _dir" "Removing $2 from $P_DSTS_INST Failed, Probably Permission Issues..." 5 -nc
fi
fi
}
# The Whole script's actions are here
# Yeah you heard me
function welcome () {
infobox "$MAIN - $VERSION_ID" "Welcome" "Welcome $(whoami)! \n$MAIN - $VERSION_ID"
sleep 3
license_agreement
}
function license_agreement () {
if [ -e .i ]; then
msg "Skip!"
menu
else
yesno "USER LICENSE AGREEMENT - USER END AREA - $MAIN - $VERSION_ID" "License Agreement (User End)" "Agree" "Exit" "$(cat assets/LC.txt)" 0 0
ARM=$?
case $ARM in
0)
gen
menu
;;
1)
clear
exit
;;
esac
fi
}
function menu () {
ERROR_FETCH="$1"
if [ -z "${ERROR_FETCH}" ]; then
VAR="\nProcess are Okay, No Error"
else
VAR="\n$ERROR_FETCH"
fi
MENU=$(dialog \
--backtitle "Main Menu - $MAIN - $VERSION_ID" \
--title "Main Menu" \
--menu "THIS WARNING SHOULDN'T BE HERE BUT, SINCE THERE'S PEOPLE WHO CANT UNDERSTAND CHROOT AND PROOT\nREAD sylirre's (Termux Core Dev) STATEMENT:\nDon't be confused by terms Chroot and Proot. They are entirely different things.\nChroot, if we talk about Linux utility/feature and not proot or equivalent, always run directly on hardware. It is not virtualizer or emulator but a Linux function for switching the root file system. The chroot is essential feature of Linux that is being used by all standard Linux distribution installations with initramfs.\nIt is being used internally by switch_root or pivot_root utility when system changes its root file system from initramfs to disk partition.\n That said, a typical 'Ubuntu desktop on PC' will always run in chroot. It's funny, isn't it?,\n\nChoose what actions do you wanna perform?\n\nSYSTEM INFO (PROVIDED BY check_info_dev): $(check_info_dev)\nWarnings: $VAR" 0 0 0 \
"Distro Manager" "Manage your Distro, Obviously"\
"Perma-configure" "Coming soon" \
"Configure" "This is an alternative to Perma-configure Temporarily" \
"Help and About" "Says in the title" \
2>&1 >/dev/tty)
ARR=$?
case $ARR in
1)
clear
exit
;;
esac
case $MENU in
"Distro Manager")
distro_manager
;;
"Perma-configure")
msgbox "Sorry - $MAIN - $VERSION_ID" "Coming Soon" "This feature is temporarily unavailable, Please wait while i cry because i cant seem to import valuables from a file to a session script"
menu
;;
"Configure")
configure
;;
"Help and About")
help_and_about
;;
esac
}
function distro_manager () {
MENU=$(dialog \
--backtitle "Distro Manager - $MAIN - $VERSION_ID" \
--title "Distro Manager" \
--menu "Pick an Option, whether to Install, Run or Remove" 0 0 0 \
"Install" "Install Distros" \
"Run" "Run Distros" \
"Uninstall" "Uninstall Distros" \
"Backup" "Backup Distros" \
"Restore" "Restore Distros" \
2>&1 >/dev/tty)
ARM=$?
case $ARM in
1)
menu
;;
esac
case $MENU in
"Install")
case $(uname -m) in
x86_64)
install_amd64
;;
i686)
install_i686
;;
armv7a|armv7l|armv8l)
install_arm32
;;
aarch64)
install_arm64
;;
*)
errorlog "noarch" "Identifying the Architecture of the device could not reach the ultimatium. CLI Software 'uname' gave us an unsupported Architecture: $(uname -m) which is not supported on termux." 5
;;
esac
;;
"Run")
case $(uname -m) in
x86_64)
run_amd64
;;
i686)
run_i686
;;
armv7a|armv7l|armv8l)
run_arm32
;;
aarch64)
run_arm64
;;
*)
errorlog "noarch" "Identifying the Architecture of the device could not reach the ultimatium. CLI Software 'uname' gave us an unsupported Architecture: $(uname -m) which is not supported on termux." 5
;;
esac
;;
"Uninstall")
case $(uname -m) in
x86_64)
remove_amd64
;;
i686)
remove_i686
;;
armv7a|armv7l|armv8l)
remove_arm32
;;
aarch64)
remove_arm64
;;
*)
errorlog "noarch" "Identifying the Architecture of the device could not reach the ultimatium. CLI Software 'uname' gave us an unsupported Architecture: $(uname -m) which is not supported on termux." 5
;;
esac
;;
"Backup")
backup_tar
;;
"Restore")
restore_tar
;;
esac
}
function install_amd64 () {
# Install page (1)
menu=$(dialog \
--backtitle "Install Distro Repositories" \
--title "Choose a Supported Distro" \
--menu "Choose architectures that are supported onboard:\nRemember to choose right" 0 0 0 \
"Alpine Linux" "The Bleeding Edge of Distro" \
"Debian Linux" "A rock stable distro" \
"Fedora Linux" "Perry the Linux Distro!" \
"OpenSUSE Linux" "Gecko Linux" \
"Pardus Linux" "Turkish Linux" \
"Ubuntu Linux" "Snap sucks" \
"Void Linux" "Void" \
2>&1 >/dev/tty)
AA=$?
case $AA in
1)
distro_manager
;;
esac
case $menu in
"Alpine Linux")
yesno "Alpine Linux" "Alpine Linux" "Yes, Install" "Back" "Do you want to install Alpine Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/ALPINE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install alpine
;;
1)
install_amd64
;;
esac
;;
"Debian Linux")
yesno "Debian Linux" "Debian Linux" "Yes, Install" "Back" "Do you want to install Debian Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/DEBIAN.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install debian
;;
1)
install_amd64
;;
esac
;;
"Fedora Linux")
yesno "Fedora Linux" "Fedora Linux" "Yes, Install" "Back" "Do you want to install Fedora Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/FEDORA.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install fedora
;;
1)
install_amd64
;;
esac
;;
"OpenSUSE Linux")
yesno "OPenSUSE Linux" "OpenSUSE Linux" "Yes, Install" "Back" "Do you want to install OpenSUSE Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/OPENSUSE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install opensuse
;;
1)
install_amd64
;;
esac
;;
"Pardus Linux")
yesno "Pardus Linux" "Pardus Linux" "Yes, Install" "Back" "Do you want to install Pardus Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/PARDUS.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install pardus
;;
1)
install_amd64
;;
esac
;;
"Ubuntu Linux")
yesno "Ubuntu Linux" "Ubuntu Linux" "Yes, Install" "Back" "Do you want to install Ubuntu Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/UBUNTU.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install ubuntu
;;
1)
install_amd64
;;
esac
;;
"Void Linux")
yesno "Void Linux" "Void Linux" "Yes, Install" "Back" "Do you want to install Void Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/VOID.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install void
;;
1)
install_amd64
;;
esac
;;
esac
}
function install_i686 () {
# Install page (2)
menu=$(dialog \
--backtitle "Install Distro Repositories" \
--title "Choose a Supported Distro" \
--menu "Choose architectures that are supported onboard:\nRemember to choose right" 0 0 0 \
"Alpine Linux" "The Bleeding Edge of Distro" \
"Debian Linux" "A rock stable distro" \
"OpenSUSE Linux" "Gecko Linux" \
"Pardus Linux" "Turkish Linux" \
"Ubuntu Linux" "Snap sucks" \
"Void Linux" "Void" \
2>&1 >/dev/tty)
AA=$?
case $AA in
1)
distro_manager
;;
esac
case $menu in
"Alpine Linux")
yesno "Alpine Linux" "Alpine Linux" "Yes, Install" "Back" "Do you want to install Alpine Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/ALPINE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install alpine
;;
1)
install_i686
;;
esac
;;
"Debian Linux")
yesno "Debian Linux" "Debian Linux" "Yes, Install" "Back" "Do you want to install Debian Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/DEBIAN.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install debian
;;
1)
install_i686
;;
esac
;;
"OpenSUSE Linux")
yesno "OPenSUSE Linux" "OpenSUSE Linux" "Yes, Install" "Back" "Do you want to install OpenSUSE Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/OPENSUSE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install opensuse
;;
1)
install_i686
;;
esac
;;
"Pardus Linux")
yesno "Pardus Linux" "Pardus Linux" "Yes, Install" "Back" "Do you want to install Pardus Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/PARDUS.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install pardus
;;
1)
install_i686
;;
esac
;;
"Ubuntu Linux")
yesno "Ubuntu Linux" "Ubuntu Linux" "Yes, Install" "Back" "Do you want to install Ubuntu Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/UBUNTU.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install ubuntu
;;
1)
install_i686
;;
esac
;;
"Void Linux")
yesno "Void Linux" "Void Linux" "Yes, Install" "Back" "Do you want to install Void Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/VOID.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install void
;;
1)
install_i686
;;
esac
;;
esac
}
function install_arm32 () {
# Install page (3)
menu=$(dialog \
--backtitle "Install Distro Repositories" \
--title "Choose a Supported Distro" \
--menu "Choose architectures that are supported onboard:\nRemember to choose right" 0 0 0 \
"Alpine Linux" "The Bleeding Edge of Distro" \
"Arch Linux" "I Use Arch BTW moment" \
"Debian Linux" "A rock stable distro" \
"OpenSUSE Linux" "Gecko Linux" \
"Pardus Linux" "Turkish Linux" \
"Ubuntu Linux" "Snap sucks" \
"Void Linux" "Void" \
2>&1 >/dev/tty)
AA=$?
case $AA in
1)
distro_manager
;;
esac
case $menu in
"Alpine Linux")
yesno "Alpine Linux" "Alpine Linux" "Yes, Install" "Back" "Do you want to install Alpine Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/ALPINE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install alpine
;;
1)
install_arm32
;;
esac
;;
"Arch Linux")
yesno "Arch Linux" "Arch Linux" "Yes, Install" "Back" "Do you want to install Arch Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/ARCH.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install archlinux
;;
1)
install_arm32
;;
esac
;;
"Debian Linux")
yesno "Debian Linux" "Debian Linux" "Yes, Install" "Back" "Do you want to install Debian Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/DEBIAN.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install debian
;;
1)
install_arm32
;;
esac
;;
"OpenSUSE Linux")
yesno "OpenSUSE Linux" "OpenSUSE Linux" "Yes, Install" "Back" "Do you want to install OpenSUSE Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/OPENSUSE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install opensuse
;;
1)
install_arm32
;;
esac
;;
"Pardus Linux")
yesno "Pardus Linux" "Pardus Linux" "Yes, Install" "Back" "Do you want to install Pardus Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/PARDUS.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install pardus
;;
1)
install_arm32
;;
esac
;;
"Ubuntu Linux")
yesno "Ubuntu Linux" "Ubuntu Linux" "Yes, Install" "Back" "Do you want to install Ubuntu Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/UBUNTU.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install ubuntu
;;
1)
install_arm32
;;
esac
;;
"Void Linux")
yesno "Void Linux" "Void Linux" "Yes, Install" "Back" "Do you want to install Void Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/VOID.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install void
;;
1)
install_arm32
;;
esac
;;
esac
}
function install_arm64 () {
# Install Page
menu=$(dialog \
--backtitle "Install Distro Repositories" \
--title "Choose a Supported Distro" \
--menu "Choose Distros that are supported onboard:\nRemember to choose right" 0 0 0 \
"Alpine Linux" "The Bleeding Edge of Distro" \
"Arch Linux" "I use Arch BTW" \
"Debian Linux" "A rock stable Distro" \
"Fedora Linux" "Perry the Linux Distro!" \
"Manjaro Linux" "Somehow, why everyone hates this guy?" \
"OpenSUSE Linux" "Gecko Linux" \
"Pardus Linux" "Turkish Linux" \
"Ubuntu Linux" "Snap sucks" \
"Void Linux" "Void" \
2>&1 >/dev/tty)
AA=$?
case $AA in
1)
distro_manager
;;
esac
case $menu in
"Alpine Linux")
yesno "Alpine Linux" "Alpine Linux" "Yes, Install" "Back" "Do you want to install Alpine Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/ALPINE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install alpine
;;
1)
install_arm64
;;
esac
;;
"Arch Linux")
yesno "Arch Linux" "Arch Linux" "Yes, Install" "Back" "Do you want to install Arch Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/ARCH.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install archlinux
;;
1)
install_arm64
;;
esac
;;
"Debian Linux")
yesno "Debian Linux" "Debian Linux" "Yes, Install" "Back" "Do you want to install Debian Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/DEBIAN.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install debian
;;
1)
install_arm64
;;
esac
;;
"Manjaro Linux")
yesno "Manjaro AArch64" "Manjaro" "Yes, Install" "Back" "Do you want to install Manjaro Linux?\n\nIf its already Installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/MANJARO.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install manjaro-aarch64
;;
1)
install_arm64
;;
esac
;;
"OpenSUSE Linux")
yesno "OpenSUSE Linux" "OpenSUSE Linux" "Yes, Install" "Back" "Do you want to install OpenSUSE Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/OPENSUSE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install opensuse
;;
1)
install_arm64
;;
esac
;;
"Pardus Linux")
yesno "Pardus Linux" "Pardus Linux" "Yes, Install" "Back" "Do you want to install Pardus Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/PARDUS.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install pardus
;;
1)
install_arm64
;;
esac
;;
"Ubuntu Linux")
yesno "Ubuntu Linux" "Ubuntu Linux" "Yes, Install" "Back" "Do you want to install Ubuntu Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/UBUNTU.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install ubuntu
;;
1)
install_arm64
;;
esac
;;
"Void Linux")
yesno "Void Linux" "Void Linux" "Yes, Install" "Back" "Do you want to install Void Linux?\n\nIf its installed, then please use the 'Run Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/VOID.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --install void
;;
1)
install_arm64
;;
esac
;;
esac
}
# Install Ends
# Run area
function run_amd64 () {
# Run page
menu=$(dialog \
--backtitle "Run Distro Repositories" \
--title "Choose a Supported Distro" \
--menu "Choose distros that are supported onboard:\nRemember to choose right" 0 0 0 \
"Alpine Linux" "The Bleeding Edge of Distro" \
"Debian Linux" "A rock stable distro" \
"Fedora Linux" "Perry the Linux Distro!" \
"OpenSUSE Linux" "Gecko Linux" \
"Pardus Linux" "Turkish Linux" \
"Ubuntu Linux" "Snap sucks" \
"Void Linux" "Void" \
2>&1 >/dev/tty)
AA=$?
case $AA in
1)
distro_manager
;;
esac
case $menu in
"Alpine Linux")
yesno "Alpine Linux" "Alpine Linux" "Run" "Back" "Do you want to run Alpine Linux?\n\nIf it's not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/ALPINE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --run alpine
;;
1)
run_amd64
;;
esac
;;
"Debian Linux")
yesno "Debian Linux" "Debian Linux" "Run" "Back" "Do you want to run Debian Linux?\n\nIf its not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/DEBIAN.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --run debian
;;
1)
run_amd64
;;
esac
;;
"Fedora Linux")
yesno "Fedora Linux" "Fedora Linux" "Run" "Back" "Do you want to run Fedora Linux?\n\nIf its not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/FEDORA.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --run fedora
;;
1)
run_amd64
;;
esac
;;
"OpenSUSE Linux")
yesno "OPenSUSE Linux" "OpenSUSE Linux" "Run" "Back" "Do you want to run OpenSUSE Linux?\n\nIf its not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/OPENSUSE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --run opensuse
;;
1)
run_amd64
;;
esac
;;
"Pardus Linux")
yesno "Pardus Linux" "Pardus Linux" "Run" "Back" "Do you want to run Pardus Linux?\n\nIf its not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/PARDUS.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --run pardus
;;
1)
run_amd64
;;
esac
;;
"Ubuntu Linux")
yesno "Ubuntu Linux" "Ubuntu Linux" "Run" "Back" "Do you want to run Ubuntu Linux?\n\nIf its not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/UBUNTU.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --run ubuntu
;;
1)
run_amd64
;;
esac
;;
"Void Linux")
yesno "Void Linux" "Void Linux" "Run" "Back" "Do you want to run Void Linux?\n\nIf its not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/VOID.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --run void
;;
1)
run_amd64
;;
esac
;;
esac
}
function run_i686 () {
# Run page
menu=$(dialog \
--backtitle "Run Distro Repositories" \
--title "Choose a Supported Distro" \
--menu "Choose architectures that are supported onboard:\nRemember to choose right" 0 0 0 \
"Alpine Linux" "The Bleeding Edge of Distro" \
"Debian Linux" "A rock stable distro" \
"OpenSUSE Linux" "Gecko Linux" \
"Pardus Linux" "Turkish Linux" \
"Ubuntu Linux" "Snap sucks" \
"Void Linux" "Void" \
2>&1 >/dev/tty)
AA=$?
case $AA in
1)
distro_manager
;;
esac
case $menu in
"Alpine Linux")
yesno "Alpine Linux" "Alpine Linux" "Run" "Back" "Do you want to run Alpine Linux?\n\nIf it's not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/ALPINE.txt)"
FETCH=$?
case $FETCH in
0)
proot_call --run alpine
;;
1)
run_i686
;;
esac
;;
"Debian Linux")
yesno "Debian Linux" "Debian Linux" "Run" "Back" "Do you want to run Debian Linux?\n\nIf its not installed, then please use the 'Install Distro' area instead\n\nSynopsis: $(cat assets/DISTRO_SYNOPSIS/DEBIAN.txt)"
FETCH=$?
case $FETCH in
0)