-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
quickget
executable file
·3100 lines (2748 loc) · 109 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
# Here the quick 'n dirty guide to adding a new OS to quickget
#
# 1. Update os_support() - add new OS, all lowercase
# 2. Update pretty_name() - add a pretty name for new OS *only if the catch all is not suitable*
# 3. Update os_homepage() - add a homepage for new OS
# 4. Create a releases_newos() generator (required) outputs the current supported release versions
# 5. Create a editions_newos() generator (optional) outputs the editions if new OS has multiple flavours/editions
# 6. Update make_vm_config() - add any *required* new OS tweaks
# 7. Create a get_newos() function - that does something like this:
#
#function get_newos() {
# local EDITION="${1:-}"
# local HASH=""
# local ISO="newos-${RELEASE}-${EDITION}-amd64.iso"
# local URL="https://www.newos.org/download/${RELEASE}/${EDITION}"
#
# HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut_1)
# echo "${URL}/${ISO} ${HASH}"
#}
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
alma) INFO="Alma Linux|Fedora,RedHat||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|Independent||https://alpinelinux.org/|Security-oriented, lightweight Linux distribution based on musl libc and busybox.";;
android) INFO="Android x86|Independent||https://www.android-x86.org/|Port Android Open Source Project to x86 platform.";;
antix) INFO="Antix|Debian||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.";;
artixlinux) INFO="Artix Linux|Arch||https://artixlinux.org/|The Art of Linux. Simple. Fast. Systemd-free.";;
archlinux) INFO="Arch Linux|Independent||https://archlinux.org/|Lightweight and flexible Linux® distribution that tries to Keep It Simple.";;
archcraft) INFO="Archcraft|Arch||https://archcraft.io/|Yet another minimal Linux distribution, based on Arch Linux.";;
arcolinux) INFO="Arco Linux|Arch||https://arcolinux.com/|Is all about becoming an expert in linux.";;
athenaos) INFO="Athena OS|Arch||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|Independent||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|Fedora,SteamOS||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|Arch||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|Debian,Ubuntu||https://www.bodhilinux.com/|Lightweight distribution featuring the fast & fully customizable Moksha Desktop.";;
bunsenlabs) INFO="Bunsenlab|Debian||https://www.bunsenlabs.org/|Light-weight and easily customizable Openbox desktop. The project is a community continuation of CrunchBang Linux.";;
cachyos) INFO="CachyOS|Arch||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|Fedora,RedHat||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|Independent|anon:chimera root:chimera|https://chimera-linux.org/|Modern, general-purpose non-GNU Linux distribution.";;
crunchbang++) INFO="#!++|Debian||https://www.crunchbangplusplus.org/|The classic minimal crunchbang feel, now with debian 12 bookworm.";;
debian) INFO="Debian|Independent||https://www.debian.org/|Complete Free Operating System with perfect level of ease of use and stability.";;
deepin) INFO="Deepin|Debian||https://www.deepin.org/|Beautiful UI design, intimate human-computer interaction, and friendly community environment make you feel at home.";;
devuan) INFO="Devuan|Debian||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|FreeBSD||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|Independent||https://easyos.org/|Experimental distribution designed from scratch to support containers.";;
edubuntu) INFO="Edubuntu|Ubuntu||https://www.edubuntu.org/|Stable, secure and privacy concious option for schools.";;
elementary) INFO="elementary OS|Debian,Ubuntu||https://elementary.io/|Thoughtful, capable, and ethical replacement for Windows and macOS.";;
endeavouros) INFO="EndeavourOS|Arch||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|Debian||https://www.endlessos.org/os|Completely Free, User-Friendly Operating System Packed with Educational Tools, Games, and More.";;
fedora) INFO="Fedora|Independent||https://www.fedoraproject.org/|Innovative platform for hardware, clouds, and containers, built with love by you.";;
freebsd) INFO="FreeBSD|Independent||https://www.freebsd.org/|Operating system used to power modern servers, desktops, and embedded platforms.";;
freedos) INFO="FreeDOS|Independent||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|Arch||https://garudalinux.org/|Feature rich and easy to use Linux distribution.";;
gentoo) INFO="Gentoo|Independent||https://www.gentoo.org/|Highly flexible, source-based Linux distribution.";;
ghostbsd) INFO="GhostBSD|FreeBSD||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|Independent||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="SteamOS HoloISO|Arch,SteamOS||https://github.com/HoloISO/holoiso|Bring the Steam Decks SteamOS Holo redistribution and provide a close-to-official SteamOS experience.";;
kali) INFO="Kali|Debian||https://www.kali.org/|The most advanced Penetration Testing Distribution.";;
kdeneon) INFO="KDE Neon|Debian,Ubuntu||https://neon.kde.org/|Latest and greatest of KDE community software packaged on a rock-solid base.";;
kolibrios) INFO="KolibriOS|Independent||http://kolibrios.org/en/|Tiny yet incredibly powerful and fast operating system.";;
kubuntu) INFO="Kubuntu|Ubuntu||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|Debian,Ubuntu||https://www.linuxliteos.com/|Your first simple, fast and free stop in the world of Linux.";;
linuxmint) INFO="Linux Mint|Debian,Ubuntu||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|Debian||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|Ubuntu||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|Independent||https://www.mageia.org/|Stable, secure operating system for desktop & server.";;
manjaro) INFO="Manjaro|Arch||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|Debian,Antix||https://mxlinux.org/|Designed to combine elegant and efficient desktops with high stability and solid performance.";;
netboot) INFO="netboot.xyz|iPXE||https://netboot.xyz/|Your favorite operating systems in one place.";;
netbsd) INFO="NetBSD|Independent||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|Independent||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|Arch|nwg:nwg|https://nwg-piotr.github.io/nwg-shell/|Arch Linux ISO with nwg-shell for sway and Hyprland";;
openbsd) INFO="OpenBSD|Independent||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|Solaris,OpenSolaris||https://www.openindiana.org/|Community supported illumos-based operating system.";;
opensuse) INFO="openSUSE|Independent||https://www.opensuse.org/|The makers choice for sysadmins, developers and desktop users.";;
oraclelinux) INFO="Oracle Linux|RedHat||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|Debian|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|Debian,Devuan||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|Ubuntu||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|Slackware||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|Ubuntu||https://primtux.fr/|Upgrade for obsolete equipment and benefiting the school or educational environment in the spirit of education.";;
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|Independent||https://reactos.org/|Imagine running your favorite Windows applications and drivers in an open-source environment you can trust.";;
rebornos) INFO="RebornOS|Arch||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|RedHat||https://rockylinux.org/|Open-source enterprise operating system designed to be 100% bug-for-bug compatible with Red Hat Enterprise Linux®.";;
siduction) INFO="Siduction|Debian||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|Independent||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|Debian Slackware||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|Slackware||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|Independent||https://www.slitaz.org/en/|Simple, fast and low resource Linux OS for servers & desktops.";;
solus) INFO="Solus|Independent||https://getsol.us/|Designed for home computing. Every tweak enables us to deliver a cohesive computing experience.";;
sparkylinux) INFO="SparkyLinux|Debian||https://sparkylinux.org/|Fast, lightweight and fully customizable operating system which offers several versions for different use cases.";;
spirallinux) INFO="Spiral Linux|Debian||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|Debian||https://tails.net/|Portable operating system that protects against surveillance and censorship.";;
tinycore) INFO="Tiny Core Linux|Independent||http://www.tinycorelinux.net/|Highly modular based system with community build extensions.";;
trisquel) INFO="Trisquel|Debian,Ubuntu||https://trisquel.info/|Fully free operating system for home users, small enterprises and educational centers.";;
truenas-core) INFO="TrueNAS Core|FreeBSD||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|Debian||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|Debian||https://ubuntu.com/|Complete desktop Linux operating system, freely available with both community and professional support.";;
ubuntu-budgie) INFO="Ubuntu Budgie|Ubuntu||https://ubuntubudgie.org/|Community developed distribution, integrating the Budgie Desktop Environment with Ubuntu at its core.";;
ubuntucinnamon) INFO="Ubuntu Cinnamon|Ubuntu||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|Ubuntu||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|Ubuntu||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|Ubuntu||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|Ubuntu||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|Ubuntu||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|Debian,Ubuntu||https://vanillaos.org/|Designed to be a reliable and productive operating system for your daily work.";;
void) INFO="Void Linux|Independent|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|Void||https://vxlinux.org/|Pre-configured, secure systemd-free Plasma desktop with focus on convenience, performance and simplicity. Based on the excellent Void Linux.";;
whonix) INFO="Whonix|Debian||https://www.whonix.org/|Superior Internet Privacy with Whonix™ As handy as an app - delivering maximum anonymity and security.";;
xubuntu) INFO="Xubuntu|Ubuntu||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|Ubuntu||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 " - based on:\t$(os_info "${1}" | cut -d'|' -f 2)"
echo -e " - Credentials:\t$(os_info "${1}" | cut -d'|' -f 3)"
echo -e " - Website:\t$(os_info "${1}" | cut -d'|' -f 4)"
echo -e " - Description:\t$(os_info "${1}" | cut -d'|' -f 5)"
}
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 4
}
function os_basedof() {
local SIMPLE_NAME=""
local BASED=""
SIMPLE_NAME="${1}"
BASED=$(os_info ${SIMPLE_NAME} | cut -d'|' -f2)
echo "${BASED}"
}
function os_credentials() {
local SIMPLE_NAME=""
local CREDE=""
SIMPLE_NAME="${1}"
CREDE=$(os_info ${SIMPLE_NAME} | cut -d'|' -f3)
echo "${CREDE}"
}
function os_homepage(){
local SIMPLE_NAME=""
local HOMEP=""
SIMPLE_NAME="${1}"
HOMEP=$(os_info ${SIMPLE_NAME} | cut -d'|' -f4)
echo "$HOMEP"
}
function os_about() {
local SIMPLE_NAME=""
local ABOUT=""
SIMPLE_NAME="${1}"
ABOUT=$(os_info ${SIMPLE_NAME} | cut -d'|' -f5)
echo "${ABOUT}"
}
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
;;
*)
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)
if [[ "${RELEASE}" -lt 40 && "${EDITION}" == "Onyx" ]] || [[ "${RELEASE}" -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
}
list_supported() {
# output OS RELEASE EDITION (usefull for straight testing...)
local DL=""
local FUNC
local OPTION
local OS
for OS in $(os_support); do
case ${OS} in
*ubuntu-server*) FUNC="ubuntu-server";;
*ubuntu*) FUNC="ubuntu";;
*) FUNC="${OS}";;
esac
for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
# If the OS has an editions_() function, use it.
if [[ $(type -t "editions_${OS}") == function ]]; then
for OPTION in $(editions_"${OS}"); do
echo "${OS} ${RELEASE} ${OPTION}"
done
else
echo "${OS} ${RELEASE}"
fi
done
done
exit 0
}
list_isos() {
local URL
local FUNC
local OPTION
local OS
echo "OS|Release|Edition|URL"
for OS in $(os_support); do
case ${OS} in
*ubuntu-server*) FUNC="ubuntu-server";;
*ubuntu*) FUNC="ubuntu";;
*) FUNC="${OS}";;
esac
for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
# If the OS has an editions_() function, use it.
if [[ $(type -t "editions_${OS}") == function ]]; then
for OPTION in $(editions_"${OS}"); do
URL=$(./quickget -u ${OS} ${RELEASE} ${OPTION})
if [ -z "${URL}" ]; then
echo "${OS}|${RELEASE}|${OPTION}|${URL}"
else
echo "${OS}|${RELEASE}|${OPTION}|${URL}"
fi
done
else
URL=$(./quickget -u ${OS} ${RELEASE})
if [ -z "${URL}" ]; then
echo "${OS}|${RELEASE}|${OPTION}|${URL}"
else
echo "${OS}|${RELEASE}|${OPTION}|${URL}"
fi
fi
done
done
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
local GOOD
# 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
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}" == "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 \
archlinux \
archcraft \
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 \
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 \
ubuntucinnamon \
ubuntukylin \
ubuntu-mate \
ubuntu-server \
ubuntustudio \
ubuntu-unity \
vanillaos \
void \
vxlinux \
xubuntu \
zorin
}
# QUICKGET-EXTENDED ONLY DISTROS!
function releases_agarimos() {
echo #TODO
}
function releases_cereus() {
echo #TODO
}
function releases_dietpi() {
echo #TODO
}
function releases_fvoid() {
echo #TODO
}
function releases_gabeeos() {
echo #TODO
}
function releases_miyo() {
echo #TODO
}
function releases_slitaz() {
echo #TODO
}
function releases_ventoy() {
echo #TODO
}
function releases_voidpup() {
echo #TODO
}
# QUICKEMU STANDARD
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() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror.ico277.xyz/blendos/gnome/" | grep "\.iso" | cut -c81- | cut -d'"' -f2 | cut -d'-' -f2)
}
function editions_blendos() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror.ico277.xyz/blendos/" | grep "\[DIR\]" | cut -c81-90 | cut -d'/' -f1 | grep -v testing | sort -u)
}
function releases_bodhi() {
echo 7.0.0
}
function editions_bodhi() {
echo standard hwe s76
}
function releases_bunsenlabs() {
echo boron
}
function releases_cachyos() {
echo latest
}
function editions_cachyos() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://mirror.cachyos.org/ISO/" | grep "title=" | grep -v testing | grep -v cli | cut -d'"' -f4 | cut -d '/' -f1 | sort)
}
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 "http://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 | .[]' | sort -r)
}
function editions_fedora() {
#shellcheck disable=SC2046,SC2005
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 | .[]')
}
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 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 releases_linuxlite() {
echo 6.6 6.4 6.2 6.0
}
function releases_linuxmint() {
echo 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_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() {
echo 23.3
}
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 "http://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 -P '(?<=<Key>nixos-)[0-9]+.[0-9]+(?=</Key>)' | sort -nr | 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