forked from quickemu-project/quickemu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quickget
executable file
·3605 lines (3239 loc) · 137 KB
/
quickget
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
#!/usr/bin/env bash
# SC2317: Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
# - https://www.shellcheck.net/wiki/SC2317
# - Disable globally because many functions are called indirectly
# shellcheck disable=SC2317
export LC_ALL=C
function cleanup() {
if [ -n "$(jobs -p)" ]; then
kill "$(jobs -p)" 2>/dev/null
fi
}
function os_info() {
local SIMPLE_NAME=""
local INFO=""
SIMPLE_NAME="${1}"
case ${SIMPLE_NAME} in
#name) INFO="PrettyName|Credentials|Homepage|Info";;
alma) INFO="AlmaLinux|-|https://almalinux.org/|Community owned and governed, forever-free enterprise Linux distribution, focused on long-term stability, providing a robust production-grade platform. AlmaLinux OS is binary compatible with RHEL®.";;
alpine) INFO="Alpine Linux|-|https://alpinelinux.org/|Security-oriented, lightweight Linux distribution based on musl libc and busybox.";;
android) INFO="Android x86|-|https://www.android-x86.org/|Port Android Open Source Project to x86 platform.";;
antix) INFO="Antix|-|https://antixlinux.com/|Fast, lightweight and easy to install systemd-free linux live CD distribution based on Debian Stable for Intel-AMD x86 compatible systems.";;
archcraft) INFO="Archcraft|-|https://archcraft.io/|Yet another minimal Linux distribution, based on Arch Linux.";;
archlinux) INFO="Arch Linux|-|https://archlinux.org/|Lightweight and flexible Linux® distribution that tries to Keep It Simple.";;
arcolinux) INFO="Arco Linux|-|https://arcolinux.com/|Is all about becoming an expert in linux.";;
artixlinux) INFO="Artix Linux|-|https://artixlinux.org/|The Art of Linux. Simple. Fast. Systemd-free.";;
athenaos) INFO="Athena OS|-|https://athenaos.org/|Offer a different experience than the most used pentesting distributions by providing only tools that fit with the user needs and improving the access to hacking resources and learning materials.";;
batocera) INFO="Batocera|-|https://batocera.org/|Retro-gaming distribution with the aim of turning any computer/nano computer into a gaming console during a game or permanently.";;
bazzite) INFO="Bazzite|-|https://github.com/ublue-os/bazzite/|Container native gaming and a ready-to-game SteamOS like.";;
biglinux) INFO="BigLinux|-|https://www.biglinux.com.br/|Is the right choice if you want to have an easy and enriching experience with Linux. It has been perfected over more than 19 years, following our motto: 'In search of the perfect system'.";;
blendos) INFO="BlendOS|-|https://blendos.co/|A seamless blend of all Linux distributions. Allows you to have an immutable, atomic and declarative Arch Linux system, with application support from several Linux distributions & Android.";;
bodhi) INFO="Bodhi|-|https://www.bodhilinux.com/|Lightweight distribution featuring the fast & fully customizable Moksha Desktop.";;
bunsenlabs) INFO="BunsenLabs|-|https://www.bunsenlabs.org/|Light-weight and easily customizable Openbox desktop. The project is a community continuation of CrunchBang Linux.";;
cachyos) INFO="CachyOS|-|https://cachyos.org/|Designed to deliver lightning-fast speeds and stability, ensuring a smooth and enjoyable computing experience every time you use it.";;
centos-stream) INFO="CentOS Stream|-|https://www.centos.org/centos-stream/|Continuously delivered distro that tracks just ahead of Red Hat Enterprise Linux (RHEL) development, positioned as a midstream between Fedora Linux and RHEL.";;
chimeralinux) INFO="Chimera Linux|anon:chimera root:chimera|https://chimera-linux.org/|Modern, general-purpose non-GNU Linux distribution.";;
crunchbang++) INFO="Crunchbangplusplus|-|https://www.crunchbangplusplus.org/|The classic minimal crunchbang feel, now with debian 12 bookworm.";;
debian) INFO="Debian|-|https://www.debian.org/|Complete Free Operating System with perfect level of ease of use and stability.";;
deepin) INFO="Deepin|-|https://www.deepin.org/|Beautiful UI design, intimate human-computer interaction, and friendly community environment make you feel at home.";;
devuan) INFO="Devuan|-|https://www.devuan.org/|Fork of Debian without systemd that allows users to reclaim control over their system by avoiding unnecessary entanglements and ensuring Init Freedom.";;
dragonflybsd) INFO="DragonFlyBSD|-|https://www.dragonflybsd.org/|Provides an opportunity for the BSD base to grow in an entirely different direction from the one taken in the FreeBSD, NetBSD, and OpenBSD series.";;
easyos) INFO="EasyOS|-|https://easyos.org/|Experimental distribution designed from scratch to support containers.";;
edubuntu) INFO="Edubuntu|-|https://www.edubuntu.org/|Stable, secure and privacy concious option for schools.";;
elementary) INFO="elementary OS|-|https://elementary.io/|Thoughtful, capable, and ethical replacement for Windows and macOS.";;
endeavouros) INFO="EndeavourOS|-|https://endeavouros.com/|Provides an Arch experience without the hassle of installing it manually for both x86_64 and ARM systems.";;
endless) INFO="Endless OS|-|https://www.endlessos.org/os|Completely Free, User-Friendly Operating System Packed with Educational Tools, Games, and More.";;
fedora) INFO="Fedora|-|https://www.fedoraproject.org/|Innovative platform for hardware, clouds, and containers, built with love by you.";;
freebsd) INFO="FreeBSD|-|https://www.freebsd.org/|Operating system used to power modern servers, desktops, and embedded platforms.";;
freedos) INFO="FreeDOS|-|https://freedos.org/|DOS-compatible operating system that you can use to play classic DOS games, run legacy business software, or develop embedded systems.";;
garuda) INFO="Garuda Linux|-|https://garudalinux.org/|Feature rich and easy to use Linux distribution.";;
gentoo) INFO="Gentoo|-|https://www.gentoo.org/|Highly flexible, source-based Linux distribution.";;
ghostbsd) INFO="GhostBSD|-|https://www.ghostbsd.org/|Simple, elegant desktop BSD Operating System.";;
gnomeos) INFO="GNOME OS|-|https://os.gnome.org/|Alpha nightly bleeding edge distro of GNOME";;
guix) INFO="Guix|-|https://guix.gnu.org/|Distribution of the GNU operating system developed by the GNU Project—which respects the freedom of computer users.";;
haiku) INFO="Haiku|-|https://www.haiku-os.org/|Specifically targets personal computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn and yet very powerful.";;
holoiso) INFO="HoloISO|-|https://github.com/HoloISO/holoiso|Bring the Steam Decks SteamOS Holo redistribution and provide a close-to-official SteamOS experience.";;
kali) INFO="Kali|-|https://www.kali.org/|The most advanced Penetration Testing Distribution.";;
kdeneon) INFO="KDE Neon|-|https://neon.kde.org/|Latest and greatest of KDE community software packaged on a rock-solid base.";;
kolibrios) INFO="KolibriOS|-|https://kolibrios.org/en/|Tiny yet incredibly powerful and fast operating system.";;
kubuntu) INFO="Kubuntu|-|https://kubuntu.org/|Free, complete, and open-source alternative to Microsoft Windows and Mac OS X which contains everything you need to work, play, or share.";;
linuxlite) INFO="Linux Lite|-|https://www.linuxliteos.com/|Your first simple, fast and free stop in the world of Linux.";;
linuxmint) INFO="Linux Mint|-|https://linuxmint.com/|Designed to work out of the box and comes fully equipped with the apps most people need.";;
lmde) INFO="Linux Mint Debian Edition|-|https://www.linuxmint.com/download_lmde.php|Aims to be as similar as possible to Linux Mint, but without using Ubuntu. The package base is provided by Debian instead.";;
lubuntu) INFO="Lubuntu|-|https://lubuntu.me/|Complete Operating System that ships the essential apps and services for daily use: office applications, PDF reader, image editor, music and video players, etc. Using lightwave lxde/lxqt.";;
mageia) INFO="Mageia|-|https://www.mageia.org/|Stable, secure operating system for desktop & server.";;
manjaro) INFO="Manjaro|-|https://manjaro.org/|Versatile, free, and open-source Linux operating system designed with a strong focus on safeguarding user privacy and offering extensive control over hardware.";;
mxlinux) INFO="MX Linux|-|https://mxlinux.org/|Designed to combine elegant and efficient desktops with high stability and solid performance.";;
netboot) INFO="netboot.xyz|-|https://netboot.xyz/|Your favorite operating systems in one place.";;
netbsd) INFO="NetBSD|-|https://www.netbsd.org/|Free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.";;
nitrux) INFO="Nitrux|-|https://nxos.org/|Powered by Debian, KDE Plasma and Frameworks, and AppImages.";;
nixos) INFO="NixOS|-|https://nixos.org/|Linux distribution based on Nix package manager, tool that takes a unique approach to package management and system configuration.";;
nwg-shell) INFO="nwg-shell|nwg:nwg|https://nwg-piotr.github.io/nwg-shell/|Arch Linux ISO with nwg-shell for sway and Hyprland";;
macos) INFO="macOS|-|https://www.apple.com/macos/|Work and play on your Mac are even more powerful. Elevate your presence on video calls. Access information in all-new ways. Boost gaming performance. And discover even more ways to personalize your Mac.";;
openbsd) INFO="OpenBSD|-|https://www.openbsd.org/|FREE, multi-platform 4.4BSD-based UNIX-like operating system. Our efforts emphasize portability, standardization, correctness, proactive security and integrated cryptography.";;
openindiana) INFO="OpenIndiana|-|https://www.openindiana.org/|Community supported illumos-based operating system.";;
opensuse) INFO="openSUSE|-|https://www.opensuse.org/|The makers choice for sysadmins, developers and desktop users.";;
oraclelinux) INFO="Oracle Linux|-|https://www.oracle.com/linux/|Linux with everything required to deploy, optimize, and manage applications on-premises, in the cloud, and at the edge.";;
parrotsec) INFO="Parrot Security|parrot:parrot|https://www.parrotsec.org/|Provides a huge arsenal of tools, utilities and libraries that IT and security professionals can use to test and assess the security of their assets in a reliable, compliant and reproducible way.";;
peppermint) INFO="PeppermintOS|-|https://peppermintos.com/|Provides a user with the opportunity to build the system that best fits their needs. While at the same time providing a functioning OS with minimum hassle out of the box.";;
popos) INFO="Pop!_OS|-|https://pop.system76.com/|Operating system for STEM and creative professionals who use their computer as a tool to discover and create.";;
porteus) INFO="Porteus|-|http://www.porteus.org/|Complete linux operating system that is optimized to run from CD, USB flash drive, hard drive, or other bootable storage media.";;
primtux) INFO="PrimTux|-|https://primtux.fr/|A complete and customizable GNU/Linux operating system intended for primary school students and suitable even for older hardware.";;
pureos) INFO="PureOS|-|https://www.pureos.net/|A fully free/libre and open source GNU/Linux operating system, endorsed by the Free Software Foundation.";;
reactos) INFO="ReactOS|-|https://reactos.org/|Imagine running your favorite Windows applications and drivers in an open-source environment you can trust.";;
rebornos) INFO="RebornOS|-|https://rebornos.org/|Aiming to make Arch Linux as user friendly as possible by providing interface solutions to things you normally have to do in a terminal.";;
rockylinux) INFO="Rocky Linux|-|https://rockylinux.org/|Open-source enterprise operating system designed to be 100% bug-for-bug compatible with Red Hat Enterprise Linux®.";;
siduction) INFO="Siduction|-|https://siduction.org/|Operating system based on the Linux kernel and the GNU project. In addition, there are applications and libraries from Debian.";;
slackware) INFO="Slackware|-|http://www.slackware.com/|Advanced Linux operating system, designed with the twin goals of ease of use and stability as top priorities.";;
slax) INFO="Slax|-|https://www.slax.org/|Compact, fast, and modern Linux operating system that combines sleek design with modular approach. With the ability to run directly from a USB flash drive without the need for installation, Slax is truly portable and fits easily in your pocket.";;
slint) INFO="Slint|-|https://slint.fr/|Slint is an easy-to-use, versatile, blind-friendly Linux distribution for 64-bit computers. Slint is based on Slackware and borrows tools from Salix. Maintainer: Didier Spaier.";;
slitaz) INFO="SliTaz|-|https://www.slitaz.org/en/|Simple, fast and low resource Linux OS for servers & desktops.";;
solus) INFO="Solus|-|https://getsol.us/|Designed for home computing. Every tweak enables us to deliver a cohesive computing experience.";;
sparkylinux) INFO="SparkyLinux|-|https://sparkylinux.org/|Fast, lightweight and fully customizable operating system which offers several versions for different use cases.";;
spirallinux) INFO="SpiralLinux|-|https://spirallinux.github.io/|Selection of Linux spins built from Debian GNU/Linux, with a focus on simplicity and out-of-the-box usability across all the major desktop environments.";;
tails) INFO="Tails|-|https://tails.net/|Portable operating system that protects against surveillance and censorship.";;
tinycore) INFO="Tiny Core Linux|-|http://www.tinycorelinux.net/|Highly modular based system with community build extensions.";;
trisquel) INFO="Trisquel-|https://trisquel.info/|Fully free operating system for home users, small enterprises and educational centers.";;
truenas-core) INFO="TrueNAS Core|-|https://www.truenas.com/truenas-core/|World’s most popular storage OS because it gives you the power to build your own professional-grade storage system to use in a variety of data-intensive applications without any software costs.";;
truenas-scale) INFO="TrueNAS Scale|-|https://www.truenas.com/truenas-scale/|Open Source Hyperconverged Infrastructure (HCI) solution. In addition to powerful scale-out storage capabilities, SCALE adds Linux Containers and VMs (KVM) so apps run closer to data.";;
tuxedo-os) INFO="Tuxedo OS|-|https://www.tuxedocomputers.com/en/|KDE Ubuntu LTS designed to go with their Linux hardware.";;
ubuntu) INFO="Ubuntu|-|https://ubuntu.com/|Complete desktop Linux operating system, freely available with both community and professional support.";;
ubuntu-budgie) INFO="Ubuntu Budgie|-|https://ubuntubudgie.org/|Community developed distribution, integrating the Budgie Desktop Environment with Ubuntu at its core.";;
ubuntucinnamon) INFO="Ubuntu Cinnamon|-|https://ubuntucinnamon.org/|Community-driven, featuring Linux Mint’s Cinnamon Desktop with Ubuntu at the core, packed fast and full of features, here is the most traditionally modern desktop you will ever love.";;
ubuntukylin) INFO="Ubuntu Kylin|-|https://ubuntukylin.com/|Universal desktop operating system for personal computers, laptops, and embedded devices. It is dedicated to bringing a smarter user experience to users all over the world.";;
ubuntu-mate) INFO="Ubuntu MATE|-|https://ubuntu-mate.org/|Stable, easy-to-use operating system with a configurable desktop environment. It is ideal for those who want the most out of their computers and prefer a traditional desktop metaphor. Using Mate desktop.";;
ubuntu-server) INFO="Ubuntu Server|-|https://ubuntu.com/server|Brings economic and technical scalability to your datacentre, public or private. Whether you want to deploy an OpenStack cloud, a Kubernetes cluster or a 50,000-node render farm, Ubuntu Server delivers the best value scale-out performance available.";;
ubuntustudio) INFO="Ubuntu Studio|-|https://ubuntustudio.org/|Comes preinstalled with a selection of the most common free multimedia applications available, and is configured for best performance for various purposes: Audio, Graphics, Video, Photography and Publishing.";;
ubuntu-unity) INFO="Ubuntu Unity|-|https://ubuntuunity.org/|Flavor of Ubuntu featuring the Unity7 desktop environment (the default desktop environment used by Ubuntu from 2010-2017).";;
vanillaos) INFO="Vanilla OS|-|https://vanillaos.org/|Designed to be a reliable and productive operating system for your daily work.";;
void) INFO="Void Linux|anon:voidlinux|https://voidlinux.org/|General purpose operating system. Its package system allows you to quickly install, update and remove software; software is provided in binary packages or can be built directly from sources.";;
vxlinux) INFO="VX Linux|-|https://vxlinux.org/|Pre-configured, secure systemd-free Plasma desktop with focus on convenience, performance and simplicity. Based on the excellent Void Linux.";;
windows) INFO="Windows|-|https://www.microsoft.com/en-us/windows/|Whether you’re gaming, studying, running a business, or running a household, Windows helps you get it done.";;
windows-server) INFO="Windows Server|-|https://www.microsoft.com/en-us/windows-server/|Platform for building an infrastructure of connected applications, networks, and web services.";;
xubuntu) INFO="Xubuntu|-|https://xubuntu.org/|Elegant and easy to use operating system. Xubuntu comes with Xfce, which is a stable, light and configurable desktop environment.";;
zorin) INFO="Zorin OS|-|https://zorin.com/os/|Alternative to Windows and macOS designed to make your computer faster, more powerful, secure, and privacy-respecting.";;
esac
echo "${INFO}"
}
function show_os_info() {
echo
echo -e "$(os_info "${1}" | cut -d'|' -f 1)"
echo -e " - Credentials:\t$(os_info "${1}" | cut -d'|' -f 2)"
echo -e " - Website:\t$(os_info "${1}" | cut -d'|' -f 3)"
echo -e " - Description:\t$(os_info "${1}" | cut -d'|' -f 4)"
}
function pretty_name() {
os_info "${1}" | cut -d'|' -f 1
}
# Just in case quickget want use it
function os_homepage() {
os_info "${1}" | cut -d'|' -f 3
}
function error_specify_os() {
echo "ERROR! You must specify an operating system."
echo "- Supported Operating Systems:"
os_support | fmt -w 80
echo -e "\nTo see all possible arguments, use:\n quickget -h or quickget --help"
exit 1
}
function os_supported() {
if [[ ! "$(os_support)" =~ ${OS} ]]; then
echo -e "ERROR! ${OS} is not a supported OS.\n"
os_support | fmt -w 80
exit 1
fi
}
function error_specify_release() {
show_os_info "${OS}"
case ${OS} in
*ubuntu-server*)
echo -en " - Releases:\t"
releases_ubuntu-server
;;
*ubuntu*)
echo -en " - Releases:\t"
releases_ubuntu
;;
*windows*)
echo -en " - Releases:\t"
"releases_${OS}"
echo -en " - Languages:\t"
"languages_${OS}"
echo "${I18NS[@]}"
;;
*)
echo -en " - Releases:\t"
"releases_${OS}" | fmt -w 80
if [[ $(type -t "editions_${OS}") == function ]]; then
echo -en " - Editions:\t"
"editions_${OS}" | fmt -w 80
fi
;;
esac
echo -e "\nERROR! You must specify a release."
exit 1
}
function error_not_supported_release() {
if [[ ! "${RELEASES[*]}" =~ ${RELEASE} ]]; then
echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n"
echo -n ' - Supported releases: '
"releases_${OS}"
exit 1
fi
}
function error_not_supported_lang() {
echo -e "ERROR! ${I18N} is not a supported $(pretty_name "${OS}") language\n"
echo -n ' - Editions: '
for I18N in "${I18NS[@]}"; do
echo -n "${I18N} "
done
exit 1
}
function error_not_supported_argument() {
echo "ERROR! Not supported argument"
echo "To see all possible arguments, use:"
echo " quickget -h or quickget --help"
exit 1
}
function handle_missing() {
# Handle odd missing Fedora combinations
case "${OS}" in
fedora)
# First we need to handle the Beta naming kludge
if [[ "${RELEASE}" == *"_Beta" ]]; then
NRELEASE="${RELEASE/_Beta/}"
else
NRELEASE="${RELEASE}"
fi
if [[ "${NRELEASE}" -lt 40 && "${EDITION}" == "Onyx" ]] || [[ "${NRELEASE}" -lt 40 && "${EDITION}" == "Sericea" ]]; then
echo "ERROR! Unsupported combination"
echo " Fedora ${RELEASE} ${EDITION} is not available, please choose another Release or Edition"
exit 1
fi;;
esac
}
function validate_release() {
local DISPLAY_NAME=""
local RELEASE_GENERATOR=""
local RELEASES=""
DISPLAY_NAME="$(pretty_name "${OS}")"
case ${OS} in
*ubuntu-server*) RELEASE_GENERATOR="releases_ubuntu-server";;
*ubuntu*) RELEASE_GENERATOR="releases_ubuntu";;
*) RELEASE_GENERATOR="${1}";;
esac
RELEASES=$(${RELEASE_GENERATOR})
error_not_supported_release
}
function list_json() {
# Reference: https://stackoverflow.com/a/67359273
list_csv | jq -R 'split(",") as $h|reduce inputs as $in ([]; . += [$in|split(",")|. as $a|reduce range(0,length) as $i ({};.[$h[$i]]=$a[$i])])'
exit 0
}
function list_csv() {
CSV_DATA="$(csv_data)"
echo "Display Name,OS,Release,Option,Downloader,PNG,SVG"
sort -t',' -k2,2 <<<"${CSV_DATA}"
exit 0
}
function csv_data() {
local DISPLAY_NAME
local DL=""
local DOWNLOADER
local FUNC
local OPTION
local OS
local PNG
local RELEASE
local SVG
local HAS_ZSYNC=0
# Check if zsync is available
if command -v zsync &>/dev/null; then
HAS_ZSYNC=1
fi
for OS in $(os_support); do
local EDITIONS=""
DISPLAY_NAME="$(pretty_name "${OS}")"
case ${OS} in
*ubuntu-server*) FUNC="ubuntu-server";;
*ubuntu*) FUNC="ubuntu";;
*) FUNC="${OS}";;
esac
PNG="https://quickemu-project.github.io/quickemu-icons/png/${FUNC}/${FUNC}-quickemu-white-pinkbg.png"
SVG="https://quickemu-project.github.io/quickemu-icons/svg/${FUNC}/${FUNC}-quickemu-white-pinkbg.svg"
if [[ $(type -t "editions_${OS}") == function ]]; then
EDITIONS=$(editions_"${OS}")
fi
for RELEASE in $("releases_${FUNC}"); do
if [[ "${OS}" == *"ubuntu"* ]] && [[ ${RELEASE} == *"daily"* ]] && [ ${HAS_ZSYNC} -eq 1 ]; then
DOWNLOADER="zsync"
else
DOWNLOADER="${DL}"
fi
# If the OS has an editions_() function, use it.
if [[ ${EDITIONS} ]]; then
for OPTION in ${EDITIONS}; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
done
elif [[ "${OS}" == "windows"* ]]; then
"languages_${OS}"
for I18N in "${I18NS[@]}"; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${I18N},${DOWNLOADER},${PNG},${SVG}"
done
else
echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
fi
done &
done
wait
}
function list_supported() {
list_csv | cut -d ',' -f2,3,4 | tr ',' ' '
exit 0
}
function test_result() {
local OS="${1}"
local RELEASE="${2}"
local EDITION="${3:-}"
local URL="${4:-}"
local RESULT="${5:-}"
if [ -n "${EDITION}" ]; then
OS="${OS}-${RELEASE}-${EDITION}"
else
OS="${OS}-${RELEASE}"
fi
if [ -n "${RESULT}" ]; then
# Pad the OS string for consistent output
OS=$(printf "%-35s" "${OS}")
echo -e "${RESULT}: ${OS} ${URL}"
else
OS=$(printf "%-36s" "${OS}:")
echo -e "${OS} ${URL}"
fi
}
function test_all() {
OS="${1}"
os_supported
local CHECK=""
local FUNC="${OS}"
if [[ "${OS}" == *ubuntu* && "${OS}" != "ubuntu-server" ]]; then
FUNC="ubuntu"
fi
local URL=""
for RELEASE in $("releases_${FUNC}"); do
if [[ $(type -t "editions_${OS}") == function ]]; then
for EDITION in $(editions_"${OS}"); do
validate_release releases_"${OS}"
URL=$(get_"${OS}" | cut -d' ' -f1 | head -n 1)
if [ "${OPERATION}" == "show" ]; then
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}"
elif [ "${OPERATION}" == "test" ]; then
CHECK=$(web_check "${URL}" && echo "PASS" || echo "FAIL")
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" "${CHECK}"
fi
done
elif [[ "${OS}" == "windows"* ]]; then
"languages_${OS}"
for I18N in "${I18NS[@]}"; do
validate_release releases_"${OS}"
if [ "${OPERATION}" == "show" ]; then
test_result "${OS}" "${RELEASE}" "${I18N}" ""
elif [ "${OPERATION}" == "test" ]; then
test_result "${OS}" "${RELEASE}" "${I18N}" "${URL}" "SKIP"
fi
done
elif [[ "${OS}" == "macos" ]]; then
validate_release releases_macos
(get_macos)
elif [ "${OS}" == "ubuntu-server" ]; then
validate_release releases_ubuntu-server
(get_ubuntu-server)
elif [[ "${OS}" == *ubuntu* ]]; then
validate_release releases_ubuntu
(get_ubuntu)
else
validate_release releases_"${OS}"
URL=$(get_"${OS}" | cut -d' ' -f1 | head -n 1)
if [ "${OPERATION}" == "show" ]; then
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}"
elif [ "${OPERATION}" == "test" ]; then
CHECK=$(web_check "${URL}" && echo "PASS" || echo "FAIL")
test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" "${CHECK}"
fi
fi
done
}
function os_support() {
echo alma \
alpine \
android \
antix \
archcraft \
archlinux \
arcolinux \
artixlinux \
athenaos \
batocera \
bazzite \
biglinux \
blendos \
bodhi \
bunsenlabs \
cachyos \
centos-stream \
chimeralinux \
crunchbang++ \
debian \
deepin \
devuan \
dragonflybsd \
easyos \
edubuntu \
elementary \
endeavouros \
endless \
fedora \
freebsd \
freedos \
garuda \
gentoo \
ghostbsd \
gnomeos \
guix \
haiku \
holoiso \
kali \
kdeneon \
kolibrios \
kubuntu \
linuxlite \
linuxmint \
lmde \
lubuntu \
macos \
mageia \
manjaro \
mxlinux \
netboot \
netbsd \
nitrux \
nixos \
nwg-shell \
openbsd \
openindiana \
opensuse \
oraclelinux \
parrotsec \
peppermint \
popos \
porteus \
primtux \
pureos \
reactos \
rebornos \
rockylinux \
siduction \
slackware \
slax \
slint \
slitaz \
solus \
sparkylinux \
spirallinux \
tails \
tinycore \
trisquel \
truenas-core \
truenas-scale \
tuxedo-os \
ubuntu \
ubuntu-budgie \
ubuntu-mate \
ubuntu-server \
ubuntu-unity \
ubuntucinnamon \
ubuntukylin \
ubuntustudio \
vanillaos \
void \
vxlinux \
windows \
windows-server \
xubuntu \
zorin
}
function releases_alma() {
echo 9 8
}
function editions_alma() {
echo boot minimal dvd
}
function releases_alpine() {
local REL=""
local RELS=""
RELS=$(web_pipe "https://dl-cdn.alpinelinux.org/alpine/" | grep '"v' | cut -d'"' -f2 | tr -d / | sort -Vr | head -n 10)
for REL in ${RELS}; do
if web_check "https://dl-cdn.alpinelinux.org/alpine/${REL}/releases/x86_64/"; then
echo -n "${REL} "
fi
done
}
function releases_android() {
echo 9.0 8.1 7.1
}
function editions_android() {
echo x86_64 x86
}
function releases_antix() {
echo 23.1 23 22 21
}
function editions_antix() {
echo net-sysv core-sysv base-sysv full-sysv net-runit core-runit base-runit full-runit
}
function releases_archcraft() {
echo latest
}
function releases_archlinux() {
echo latest
}
function releases_arcolinux() {
#shellcheck disable=SC2046,SC2005
# breaking change in v24.05
# v24.05.1 is the first release with the new naming scheme and too complex to parse old and new so just show the new
echo $(web_pipe "https://mirror.accum.se/mirror/arcolinux.info/iso/" | grep -o -E -e "v24.0[5-9].[[:digit:]]{2}" -e "v24.1[0-2].[[:digit:]]{2}" | sort -ru | head -n 5)
}
function editions_arcolinux() {
echo net plasma pro
}
function releases_artixlinux() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror1.artixlinux.org/iso/" | grep "artix-" | cut -d'"' -f2 | grep -v sig | cut -d'-' -f 4 | sort -ru | tail -n 1)
}
function editions_artixlinux() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror1.artixlinux.org/iso/" | grep "artix-" | cut -d'"' -f2 | grep -v sig | cut -d'-' -f2-3 | sort -u)
}
function releases_athenaos() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://api.github.com/repos/Athena-OS/athena/releases" | grep 'download_url' | grep rolling | cut -d'/' -f8 | sort -u)
}
function releases_batocera() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirrors.o2switch.fr/batocera/x86_64/stable/" | grep ^\<a | cut -d'"' -f2 | cut -d '/' -f1 | grep -v '\.' | sort -ru | tail -n +2 | head -n 5)
}
function releases_bazzite() {
echo latest
}
function editions_bazzite() {
echo gnome kde
}
function releases_biglinux() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://iso.biglinux.com.br" | grep -Eo 'biglinux_[0-9]{4}(-[0-9]{2}){2}_k[0-9]{2,3}.iso' | cut -d'_' -f2 | sort -ru | head -n 1)
}
function editions_biglinux() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://iso.biglinux.com.br" | grep -Eo "biglinux_$(releases_biglinux)_k[0-9]{2,3}.iso" | cut -d'_' -f3 | cut -d'.' -f1 | sort -Vru)
}
function releases_blendos() {
# there is now just a single latest iso
echo latest
}
function releases_bodhi() {
echo 7.0.0
}
function editions_bodhi() {
echo standard hwe s76
}
function releases_bunsenlabs() {
echo boron
}
function releases_cachyos() {
# new cdn setup 10/2024
echo latest
}
function editions_cachyos() {
# desktop version now installs different desktop environments
echo desktop handheld
}
function releases_centos-stream() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://linuxsoft.cern.ch/centos-stream/" | grep "\-stream" | cut -d'"' -f 6 | cut -d'-' -f 1)
}
function editions_centos-stream() {
echo boot dvd1
}
function releases_chimeralinux() {
echo latest
}
function editions_chimeralinux() {
echo base gnome
}
function releases_crunchbang++() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://api.github.com/repos/CBPP/cbpp/releases" | grep 'download_url' | cut -d'-' -f2 | grep '^[0-9]' | sort -gru)
}
function releases_debian() {
local ARCHIVE=""
local MAJ=""
local NEW=""
local OLD=""
NEW=$(web_pipe "https://cdimage.debian.org/debian-cd/" | grep '\.[0-9]/' | cut -d'>' -f 9 | cut -d'/' -f 1)
echo -n "${NEW}"
MAJ=$(echo "${NEW}" | cut -d'.' -f 1)
ARCHIVE="$(web_pipe "https://cdimage.debian.org/cdimage/archive/" | grep folder | grep -v NEVER | cut -d'"' -f 6)"
for i in {1..2}; do
CUR=$((MAJ - i))
OLD=$(grep ^"${CUR}" <<< "${ARCHIVE}" | tail -n 1 | tr -d '/')
echo -n " ${OLD}"
done
echo
}
function editions_debian() {
echo standard cinnamon gnome kde lxde lxqt mate xfce netinst
}
function releases_deepin() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirrors.kernel.org/deepin-cd/" | grep "href=" | cut -d'"' -f2 | grep -v "\.\." | grep -v nightly | grep -v preview | sed 's|/||g' | tail -n 10 | sort -r)
}
function releases_devuan() {
echo daedalus chimaera beowulf
}
function releases_dragonflybsd() {
# If you remove "".bz2" from the end of the searched URL, you will get only the current release - currently 6.4.0
# We could add a variable so this behaviour is optional/switchable (maybe from option or env)
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror-master.dragonflybsd.org/iso-images/" | grep -E -o '"dfly-x86_64-.*_REL.iso.bz2"' | grep -o -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+')
}
function releases_easyos() {
#local Y2023=""
#local Y2024=""
#Y2024=$(web_pipe https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2024/ | grep "tr class" | tail -n +2 | cut -d'"' -f6 | cut -d'/' -f1 | sort -r)
#Y2023=$(web_pipe https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/ | grep "tr class" | tail -n +2 | cut -d'"' -f6 | cut -d'/' -f1 | sort -r)
#echo -n ${2024}
#echo ${Y2023}
# Not dynamic for now
echo 5.7 5.6.7 5.6.6 5.6.5 5.6.4 5.6.3 5.6.2 5.6.1
}
function releases_elementary() {
echo 7.1 7.0
}
function releases_endeavouros() {
local ENDEAVOUR_RELEASES=""
ENDEAVOUR_RELEASES="$(web_pipe "https://mirror.alpix.eu/endeavouros/iso/" | grep -o '<a href="[^"]*.iso">' | sed 's/^<a href="//;s/.iso">.*//' | grep -v 'x86_64' | LC_ALL="en_US.UTF-8" sort -Mr | cut -c 13- | head -n 5 | tr '\n' ' ')"
echo "${ENDEAVOUR_RELEASES,,}"
}
function releases_endless() {
echo 5.1.1
}
function editions_endless() {
echo base en fr pt_BR es
}
function releases_fedora() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://getfedora.org/releases.json" | jq -r 'map(.version) | unique | .[]' | sed 's/ /_/g' | sort -r)
}
function editions_fedora() {
#shellcheck disable=SC2046,SC2005
if [[ -z ${RELEASE} ]]; then
echo $(web_pipe "https://getfedora.org/releases.json" | jq -r "map(select(.arch==\"x86_64\" and .variant!=\"Labs\" and .variant!=\"IoT\" and .variant!=\"Container\" and .variant!=\"Cloud\" and .variant!=\"Everything\" and .subvariant!=\"Security\" and .subvariant!=\"Server_KVM\" and .subvariant!=\"SoaS\")) | map(.subvariant) | unique | .[]")
else
echo $(web_pipe "https://getfedora.org/releases.json" | jq -r "map(select(.arch==\"x86_64\" and .version==\"${RELEASE/_/ }\" and .variant!=\"Labs\" and .variant!=\"IoT\" and .variant!=\"Container\" and .variant!=\"Cloud\" and .variant!=\"Everything\" and .subvariant!=\"Security\" and .subvariant!=\"Server_KVM\" and .subvariant!=\"SoaS\")) | map(.subvariant) | unique | .[]")
fi
}
function releases_freebsd() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://download.freebsd.org/ftp/releases/amd64/amd64/" | grep -Eo "href=\"[0-9\.]+-RELEASE" | grep -oE '[0-9\.]+' | sort -r)
}
function editions_freebsd() {
echo disc1 dvd1
}
function releases_freedos() {
echo 1.3 1.2
}
function releases_garuda() {
echo latest
}
function editions_garuda() {
echo cinnamon dr460nized dr460nized-gaming gnome i3 kde-git kde-lite lxqt-kwin mate qtile sway wayfire xfce
}
function releases_gentoo() {
echo latest
}
function editions_gentoo() {
echo minimal livegui
}
function releases_ghostbsd() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://download.ghostbsd.org/releases/amd64/" | grep "href" | cut -d'"' -f2 | cut -d'/' -f1 | sort -r | tail -n +3 | head -n 3)
}
function editions_ghostbsd() {
echo mate xfce
}
function releases_gnomeos() {
#shellcheck disable=SC2046,SC2005
echo "nightly" $(web_pipe "https://download.gnome.org/gnomeos/" | grep "title=" | awk -F'"' '{print $4}' | tr -d '/' | sort -nr)
}
function releases_guix() {
echo 1.4.0 1.3.0
}
function releases_haiku() {
echo r1beta5 r1beta4 r1beta3
}
function editions_haiku() {
echo x86_64 x86_gcc2h
}
function releases_holoiso() {
echo "latest"
}
function releases_kali() {
echo current kali-weekly
}
function releases_kdeneon() {
echo user testing unstable developer
}
function releases_kolibrios() {
echo latest
}
function editions_kolibrios() {
echo en_US ru_RU it_IT es_ES
}
function releases_linuxlite() {
echo 6.6 6.4 6.2 6.0
}
function releases_linuxmint() {
echo 22 21.3 21.2 21.1 21 20.3 20.2
}
function editions_linuxmint() {
echo cinnamon mate xfce
}
function editions_lmde() {
echo cinnamon
}
function releases_lmde() {
echo 6
}
function releases_macos() {
echo mojave catalina big-sur monterey ventura sonoma
}
function releases_mageia() {
echo 9 8
}
function editions_mageia() {
echo Plasma GNOME Xfce
}
function editions_manjaro() {
echo full minimal
}
function releases_manjaro() {
echo xfce gnome plasma cinnamon i3 sway
}
function releases_mxlinux() {
# needs header, so not web_pipe:
curl -Ils "https://sourceforge.net/projects/mx-linux/files/latest/download" | grep -i 'location:' | cut -d? -f1 | cut -d_ -f1 | cut -d- -f3
}
function editions_mxlinux() {
echo Xfce KDE Fluxbox
}
function releases_netboot() {
echo latest
}
function releases_netbsd() {
# V8 is EOL so filter it out
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://cdn.netbsd.org/pub/NetBSD/iso/" | grep -o -E '"[[:digit:]]+\.[[:digit:]]+/"' | tr -d '"/' | grep -v ^8 | sort -nr | head -n 4)
}
function releases_nitrux() {
echo latest
}
function releases_nixos() {
# Lists unstable plus the two most recent releases
#shellcheck disable=SC2046
echo unstable $(web_pipe "https://nix-channels.s3.amazonaws.com/?delimiter=/" | grep -o -E 'nixos-[[:digit:]]+\.[[:digit:]]+' | cut -d- -f2 | sort -nru | head -n +2)
}
function editions_nixos() {
echo minimal plasma gnome
}
function releases_nwg-shell() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://sourceforge.net/projects/nwg-iso/rss?path=/" | grep 'url=' | grep '64.iso' | cut -d'/' -f12 | cut -d'-' -f3)
}
function releases_openbsd() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror.leaseweb.com/pub/OpenBSD/" | grep -e '6\.[8-9]/' -e '[7-9]\.' | cut -d\" -f4 | tr -d '/' | sort -r)
}
function releases_openindiana() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://dlc.openindiana.org/isos/hipster/" | grep link | cut -d'/' -f 1 | cut -d '"' -f4 | sort -r | tail -n +2 | head -n 5)
}
function editions_openindiana() {
echo gui text minimal
}
function releases_opensuse() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://download.opensuse.org/distribution/leap/" | grep 'class="name"' | cut -d '/' -f2 | grep -v 42 | sort -r) aeon microos tumbleweed
}
function releases_oraclelinux() {
echo 9.3 9.2 9.1 9.0 8.9 8.8 8.7 8.6 8.5 8.4 7.9 7.8 7.7
}
function releases_parrotsec() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://download.parrot.sh/parrot/iso/" | grep -o -E 'href="[[:digit:]]\.[[:digit:]]+' | sort -nr | head -n 3 | cut -d\" -f 2 )
}
function editions_parrotsec() {
echo home htb security
}
function releases_peppermint() {
echo latest
}
function editions_peppermint() {
echo devuan-xfce devuan-gnome debian-xfce debian-gnome
}
function releases_popos() {
echo 22.04 20.04
}
function editions_popos() {
echo intel nvidia
}
function releases_porteus() {
echo 5.01
}
function editions_porteus() {
echo cinnamon gnome kde lxde lxqt mate openbox xfce
}
function releases_primtux() {
echo 7
}
function editions_primtux() {
echo 2022-10
}
function releases_pureos() {
web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '"' -f 2 | cut -d '-' -f 4
}
function editions_pureos() {
echo gnome plasma
}
function releases_reactos() {
echo latest
}
function releases_rebornos() {
echo latest
}
function releases_rockylinux() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "http://dl.rockylinux.org/vault/rocky/" | grep "^<a href" | grep -v full | grep -v RC | grep -v ISO | cut -d'"' -f2 | tr -d / | sort -ru)
}
function editions_rockylinux() {
echo minimal dvd boot
}
function releases_siduction() {
echo latest
}
function editions_siduction() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror.math.princeton.edu/pub/siduction/iso/Standing_on_the_Shoulders_of_Giants/" | grep folder | cut -d'"' -f8 | tr -d '/' | sort -u)
}
function releases_slackware() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://slackware.nl/slackware/slackware-iso/" | grep "slackware-" | cut -d'<' -f7 | cut -d'-' -f2 | sort -ru | head -n 5)
}
function releases_slax() {
echo latest
}
function editions_slax() {
echo debian slackware
}
function releases_slint() {
echo "15.0-5"
}
function releases_slitaz() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror.slitaz.org/iso/rolling/" | grep "class='iso'" | cut -d"'" -f4 | cut -d'-' -f3- | grep iso | cut -d'.' -f1 | sort -u)
}
function releases_solus() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://getsol.us/download/" | grep "isos" | grep Download | cut -d'-' -f 2 | sort -ru)
}
function editions_solus() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://getsol.us/download/" | grep "isos" | grep Download | cut -d'.' -f5 | cut -d'-' -f2- | sort -u)