forked from quickemu-project/quickemu
-
Notifications
You must be signed in to change notification settings - Fork 1
/
quickget
executable file
·2861 lines (2506 loc) · 96.3 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
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_homepages() - 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 -d' ' -f1)
# echo "${URL}/${ISO} ${HASH}"
#}
function cleanup() {
if [ -n "$(jobs -p)" ]; then
kill "$(jobs -p)"
fi
}
if [ "${1}" == '--test-iso-url' ] || [ "${1}" == '-t' ]; then
test_iso_url="on"
if [ -n "$4" ]; then
set -- "$2" "$3" "$4"
elif [ -n "$3" ]; then
set -- "$2" "$3"
else
set -- "$2"
fi
elif [ "${1}" == '--show-iso-url' ] || [ "${1}" == '-s' ]; then
show_iso_url="on"
if [ -n "$4" ]; then
set -- "$2" "$3" "$4"
elif [ -n "$3" ]; then
set -- "$2" "$3"
else
set -- "$2"
fi
elif [ "${1}" == '--open-distro-homepage' ] || [ "${1}" == '-o' ]; then
open_distro_homepage="on"
set -- "$2"
fi
function pretty_name() {
local SIMPLE_NAME=""
local PRETTY_NAME=""
SIMPLE_NAME="${1}"
case ${SIMPLE_NAME} in
alma) PRETTY_NAME="Alma Linux";;
alpine) PRETTY_NAME="Alpine Linux";;
android) PRETTY_NAME="Android x86";;
archlinux) PRETTY_NAME="Arch Linux";;
archcraft) PRETTY_NAME="Archcraft";;
arcolinux) PRETTY_NAME="Arco Linux";;
blendos) PRETTY_NAME="BlendOS";;
cachyos) PRETTY_NAME="CachyOS";;
centos-stream) PRETTY_NAME="CentOS Stream";;
dragonflybsd) PRETTY_NAME="DragonFlyBSD";;
easyos) PRETTY_NAME="EasyOS";;
elementary) PRETTY_NAME="elementary OS";;
endeavouros) PRETTY_NAME="EndeavourOS";;
endless) PRETTY_NAME="Endless OS";;
freebsd) PRETTY_NAME="FreeBSD";;
freedos) PRETTY_NAME="FreeDOS";;
garuda) PRETTY_NAME="Garuda Linux";;
ghostbsd) PRETTY_NAME="GhostBSD";;
holoiso) PRETTY_NAME="SteamOS HoloISO";;
kdeneon) PRETTY_NAME="KDE Neon";;
kolibrios) PRETTY_NAME="KolibriOS";;
linuxlite) PRETTY_NAME="Linux Lite";;
linuxmint) PRETTY_NAME="Linux Mint";;
lmde) PRETTY_NAME="Linux Mint Debian Edition";;
mageia) PRETTY_NAME="Mageia";;
mxlinux) PRETTY_NAME="MX Linux";;
netboot) PRETTY_NAME="netboot.xyz";;
netbsd) PRETTY_NAME="NetBSD";;
nixos) PRETTY_NAME="NixOS";;
macos) PRETTY_NAME="macOS";;
openbsd) PRETTY_NAME="OpenBSD";;
openindiana) PRETTY_NAME="OpenIndiana";;
opensuse) PRETTY_NAME="openSUSE";;
oraclelinux) PRETTY_NAME="Oracle Linux";;
peppermint) PRETTY_NAME="PeppermintOS";;
popos) PRETTY_NAME="Pop!_OS";;
reactos) PRETTY_NAME="ReactOS";;
rebornos) PRETTY_NAME="RebornOS";;
rockylinux) PRETTY_NAME="Rocky Linux";;
tinycore) PRETTY_NAME="Tiny Core Linux";;
truenas-core) PRETTY_NAME="TrueNAS Core";;
truenas-scale) PRETTY_NAME="TrueNAS Scale";;
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
ubuntucinnamon) PRETTY_NAME="Ubuntu Cinnamon";;
ubuntukylin) PRETTY_NAME="Ubuntu Kylin";;
ubuntu-mate) PRETTY_NAME="Ubuntu MATE";;
ubuntu-server) PRETTY_NAME="Ubuntu Server";;
ubuntustudio) PRETTY_NAME="Ubuntu Studio";;
ubuntu-unity) PRETTY_NAME="Ubuntu Unity";;
vanillaos) PRETTY_NAME="Vanilla OS";;
void) PRETTY_NAME="Void Linux";;
vxlinux) PRETTY_NAME="VX Linux";;
xerolinux) PRETTY_NAME="XeroLinux";;
zorin) PRETTY_NAME="Zorin OS";;
*) PRETTY_NAME="${SIMPLE_NAME^}";;
esac
echo "${PRETTY_NAME}"
}
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})
if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n"
echo -n "${RELEASES}"
exit 1
fi
}
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() {
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
if command -v aria2c &>/dev/null; then
DL="aria2c"
elif command -v wget &>/dev/null; then
DL="wget"
fi
echo "Display Name,OS,Release,Option,Downloader,PNG,SVG"
for OS in $(os_support); do
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"
for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
if [ "${OS}" == "macos" ]; then
DOWNLOADER="macrecovery"
elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ] && [ ${HAS_ZSYNC} -eq 1 ]; then
DOWNLOADER="zsync"
else
DOWNLOADER="${DL}"
fi
# If the OS has an editions_() function, use it.
if [[ $(type -t "editions_${OS}") == function ]]; then
for OPTION in $(editions_"${OS}"); do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
done
elif [ "${OS}" == "windows" ]; then
for OPTION in "${LANGS[@]}"; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
done
else
echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
fi
done
done
exit 0
}
function os_support() {
echo alma \
alpine \
android \
antix \
archlinux \
archcraft \
arcolinux \
batocera \
blendos \
bodhi \
bunsenlabs \
cachyos \
centos-stream \
debian \
deepin \
devuan \
dragonflybsd \
easyos \
edubuntu \
elementary \
endeavouros \
endless \
fedora \
freebsd \
freedos \
garuda \
gentoo \
ghostbsd \
haiku \
holoiso \
kali \
kdeneon \
kolibrios \
kubuntu \
linuxlite \
linuxmint \
lmde \
mageia \
manjaro \
mxlinux \
netboot \
netbsd \
nixos \
lubuntu \
macos \
openbsd \
openindiana \
opensuse \
oraclelinux \
peppermint \
popos \
porteus \
reactos \
rebornos \
rockylinux \
siduction \
slackware \
solus \
spiral \
tails \
tinycore \
trisquel \
truenas-core \
truenas-scale \
ubuntu \
ubuntu-budgie \
ubuntucinnamon \
ubuntukylin \
ubuntu-mate \
ubuntu-server \
ubuntustudio \
ubuntu-unity \
vanillaos \
void \
vxlinux \
windows \
xerolinux \
xubuntu \
zorin
}
function os_homepages(){
local SIMPLE_NAME=""
local HOMEPAGE=""
SIMPLE_NAME="${1}"
case ${SIMPLE_NAME} in
alma) HOMEPAGE="https://almalinux.org/";;
alpine) HOMEPAGE="https://alpinelinux.org/";;
android) HOMEPAGE="https://www.android-x86.org/";;
antix) HOMEPAGE="https://antixlinux.com/";;
archlinux) HOMEPAGE="https://archlinux.org/";;
archcraft) HOMEPAGE="https://archcraft.io/";;
arcolinux) HOMEPAGE="https://arcolinux.com/";;
batocera) HOMEPAGE="https://batocera.org/";;
blendos) HOMEPAGE="https://blendos.co/";;
bodhi) HOMEPAGE="https://www.bodhilinux.com/";;
bunsenlabs) HOMEPAGE="https://www.bunsenlabs.org/";;
cachyos) HOMEPAGE="https://cachyos.org/";;
centos-stream) HOMEPAGE="https://www.centos.org/centos-stream/";;
debian) HOMEPAGE="https://www.debian.org/";;
deepin) HOMEPAGE="https://www.deepin.org/";;
devuan) HOMEPAGE="https://www.devuan.org/";;
dragonflybsd) HOMEPAGE="https://www.dragonflybsd.org/";;
easyos) HOMEPAGE="https://easyos.org/";;
edubuntu) HOMEPAGE="https://www.edubuntu.org/";;
elementary) HOMEPAGE="https://elementary.io/";;
endeavouros) HOMEPAGE="https://endeavouros.com/";;
endless) HOMEPAGE="https://www.endlessos.org/os";;
fedora) HOMEPAGE="https://www.fedoraproject.org/";;
freebsd) HOMEPAGE="https://www.freebsd.org/";;
freedos) HOMEPAGE="https://freedos.org/";;
garuda) HOMEPAGE="https://garudalinux.org/";;
gentoo) HOMEPAGE="https://www.gentoo.org/";;
ghostbsd) HOMEPAGE="https://www.ghostbsd.org/";;
haiku) HOMEPAGE="https://www.haiku-os.org/";;
holoiso) HOMEPAGE="https://github.com/HoloISO/holoiso";;
kali) HOMEPAGE="https://www.kali.org/";;
kdeneon) HOMEPAGE="https://neon.kde.org/";;
kolibrios) HOMEPAGE="http://kolibrios.org/en/";;
kubuntu) HOMEPAGE="https://kubuntu.org/";;
linuxlite) HOMEPAGE="https://www.linuxliteos.com/";;
linuxmint) HOMEPAGE="https://linuxmint.com/";;
lmde) HOMEPAGE="https://www.linuxmint.com/download_lmde.php";;
mageia) HOMEPAGE="https://www.mageia.org/";;
manjaro) HOMEPAGE="https://manjaro.org/";;
mxlinux) HOMEPAGE="https://mxlinux.org/";;
netboot) HOMEPAGE="https://netboot.xyz/";;
netbsd) HOMEPAGE="https://www.netbsd.org/";;
nixos) HOMEPAGE="https://nixos.org/";;
lubuntu) HOMEPAGE="https://lubuntu.me/";;
macos) HOMEPAGE="https://www.apple.com/macos/";;
openbsd) HOMEPAGE="https://www.openbsd.org/";;
openindiana) HOMEPAGE="https://www.openindiana.org/";;
opensuse) HOMEPAGE="https://www.opensuse.org/";;
oraclelinux) HOMEPAGE="https://www.oracle.com/linux/";;
peppermint) HOMEPAGE="https://peppermintos.com/";;
popos) HOMEPAGE="https://pop.system76.com/";;
porteus) HOMEPAGE="http://www.porteus.org/";;
reactos) HOMEPAGE="https://reactos.org/";;
rebornos) HOMEPAGE="https://rebornos.org/";;
rockylinux) HOMEPAGE="https://rockylinux.org/";;
siduction) HOMEPAGE="https://siduction.org/";;
slackware) HOMEPAGE="http://www.slackware.com/";;
solus) HOMEPAGE="https://getsol.us/";;
spiral) HOMEPAGE="https://spirallinux.github.io/";;
tails) HOMEPAGE="https://tails.net/";;
tinycore) HOMEPAGE="http://www.tinycorelinux.net/";;
trisquel) HOMEPAGE="https://trisquel.info/";;
truenas-core) HOMEPAGE="https://www.truenas.com/truenas-core/";;
truenas-scale) HOMEPAGE="https://www.truenas.com/truenas-scale/";;
ubuntu) HOMEPAGE="https://ubuntu.com/";;
ubuntu-budgie) HOMEPAGE="https://ubuntubudgie.org/";;
ubuntucinnamon) HOMEPAGE="https://ubuntucinnamon.org/";;
ubuntukylin) HOMEPAGE="https://ubuntukylin.com/";;
ubuntu-mate) HOMEPAGE="https://ubuntu-mate.org/";;
ubuntu-server) HOMEPAGE="https://ubuntu.com/server";;
ubuntustudio) HOMEPAGE="https://ubuntustudio.org/";;
ubuntu-unity) HOMEPAGE="https://ubuntuunity.org/";;
vanillaos) HOMEPAGE="https://vanillaos.org/";;
void) HOMEPAGE="https://voidlinux.org/";;
vxlinux) HOMEPAGE="https://vxlinux.org/";;
windows) HOMEPAGE="https://www.microsoft.com/en-us/windows/";;
xerolinux) HOMEPAGE="https://xerolinux.xyz/";;
xubuntu) HOMEPAGE="https://xubuntu.org/";;
zorin) HOMEPAGE="https://zorin.com/os/";;
esac
echo "${HOMEPAGE}"
}
function releases_alma() {
echo 8 9
}
function editions_alma() {
echo boot minimal dvd
}
function releases_alpine() {
echo 3.12 3.13 3.14 3.15 3.16 3.17 3.18 latest
}
function releases_android() {
echo 7.1 8.1 9.0
}
function editions_android() {
echo x86 x86_64
}
function releases_antix() {
echo 21 22 23
}
function editions_antix() {
echo net-sysv core-sysv base-sysv full-sysv net-runit core-runit base-runit full-runit
}
function releases_archlinux() {
echo latest
}
function releases_archcraft() {
echo latest
}
function releases_arcolinux() {
local RLIST
RLIST=$(curl -s https://ant.seedhost.eu/arcolinux/iso/ | grep -o -E ">v[[:digit:]]{2}.[[:digit:]]{2}.[[:digit:]]{2}" | sed -e "s/>//" | tr '\r\n' ' ')
echo ${RLIST}
}
function editions_arcolinux() {
echo large small
}
function releases_blendos() {
# Pull the rss feed
wget -q https://sourceforge.net/projects/blendos/rss?path=/ISOs/ -O- | grep -E -o 'https://.*blendOS\.iso.*</media:hash' >/tmp/blendos-isos.rss
local RLIST
RLIST=$(grep -E -o 'https://.*blendOS\.iso.*</media:hash' /tmp/blendos-isos.rss | cut -d/ -f 8-9 | sort -r -t/ --key=2 |grep -e '16878' -e '168[8-9]')
echo ${RLIST}
}
function releases_bunsenlabs() {
echo latest
}
function releases_bodhi() {
echo 7.0.0
}
function editions_bodhi() {
echo standard hwe s76
}
function releases_cachyos() {
echo 230813
}
function editions_cachyos() {
echo kde gnome
}
function releases_centos-stream() {
echo 8 9
}
function editions_centos-stream() {
echo dvd1 boot
}
function releases_debian() {
DEBCURRENT=$(wget -q https://cdimage.debian.org/debian-cd/ -O- |grep '\.[0-9]/'|cut -d\> -f9|cut -d\/ -f1)
local DEBOLD=$(wget -q https://cdimage.debian.org/cdimage/archive/ -O- |grep -e '>[1-9][0-9]\.'|grep -v 'live' | cut -d\> -f9|cut -d\/ -f1 )
echo ${DEBOLD} ${DEBCURRENT}
}
function editions_debian() {
echo standard cinnamon gnome kde lxde lxqt mate xfce netinst
}
function releases_deepin() {
echo 20 20.1 20.2 20.2.1 20.2.2 20.2.3 20.2.4 20.3 20.4 20.5 20.6 20.7
}
function releases_devuan() {
echo beowulf chimaera daedalus
}
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)
DBSD_RELEASES=$(curl -sL http://mirror-master.dragonflybsd.org/iso-images/| grep -E -o '"dfly-x86_64-.*_REL.iso.bz2"' | grep -o -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' )
echo $DBSD_RELEASES
}
function releases_easyos() {
#local RLIST
#RLIST=$(curl -s https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/ | grep 'href="' | tail +2 | cut -d'/' -f1 | cut -d'"' -f6)
#RLIST=$(wget -q -O- 'https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/2023/' | grep 'href="' | tail +2 | cut -d'/' -f1 | cut -d'"' -f6)
#echo ${RLIST}
# Not dynamic for now
echo 5.6.4 5.6.3 5.6.2 5.6.1 5.5.5 5.5.4
}
function releases_elementary() {
echo 7.0 7.1
}
function releases_endeavouros() {
echo apollo_22_1 \
artemis-22_6 \
artemis_neo_22_7 \
artemis_neo_22_8 \
artemis_nova_22_9 \
atlantis-21_4 \
atlantis_neo-21_5 \
cassini_22_12
}
function releases_endless() {
echo 5.0.0
}
function editions_endless() {
echo base en fr pt_BR es
}
function releases_fedora() {
echo 38 39
}
function releases_batocera() {
echo latest
}
function editions_fedora() {
echo Workstation \
Budgie \
Cinnamon \
i3 \
KDE \
LXDE \
LXQt \
Mate \
Xfce \
Silverblue \
Sericea \
Kinoite \
Sway \
Server \
Onyx
}
function releases_freebsd(){
local FBSD_RELEASES=$(curl -sL https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/|grep -e 'class="link"' |grep -v '\.\.'|cut -d\" -f4|tr -d '/')
echo ${FBSD_RELEASES}
}
function editions_freebsd(){
echo disc1 dvd1
}
function releases_freedos() {
echo 1.2 1.3
}
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 releases_ghostbsd() {
echo 21.10.16 21.11.24 22.01.12
}
function editions_ghostbsd() {
echo mate xfce
}
function releases_haiku() {
echo r1beta3 r1beta4
}
function editions_haiku() {
echo x86_64 x86_gcc2h
}
function releases_holoiso() {
wget -q https://github.com/HoloISO/holoiso/releases/latest -O- | grep -o -e 'releases/tag/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]' | head -1 | cut -d/ -f3
}
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.0 6.2 6.4 6.6
}
function releases_linuxmint(){
echo 20.2 20.3 21 21.1 21.2
}
function editions_linuxmint(){
echo cinnamon mate xfce
}
function editions_lmde(){
echo cinnamon
}
function releases_lmde(){
echo 5
}
function releases_mageia(){
echo 8
}
function editions_mageia(){
echo Plasma GNOME Xfce
}
function releases_mxlinux(){
echo 21.3
}
function editions_mxlinux(){
echo Xfce KDE Fluxbox
}
function editions_manjaro(){
echo full minimal
}
function releases_macos() {
echo high-sierra mojave catalina big-sur monterey ventura
}
function releases_manjaro() {
echo xfce \
gnome \
plasma \
budgie \
cinnamon \
i3 \
mate \
sway
}
function releases_netboot() {
echo latest
}
function releases_netbsd() {
local NBSD_RELEASES=$(curl -sL http://cdn.netbsd.org/pub/NetBSD/iso/ | grep -o -E '"[[:digit:]]+\.[[:digit:]]+/"' |tr -d '"/' |sort -nr )
echo ${NBSD_RELEASES}
}
function releases_nixos(){
echo 21.05 21.11 22.05 22.11 23.05 23.11
}
function editions_nixos(){
echo gnome plasma5 minimal
}
function releases_openbsd(){
local OBSD_RELEASES=$(curl -sL https://mirror.leaseweb.com/pub/OpenBSD/|grep -e '6\.[8-9]/' -e '[7-9]\.'|cut -d\" -f4|tr -d '/')
echo ${OBSD_RELEASES}
}
function releases_openindiana(){
echo 20230421
}
function editions_openindiana(){
echo gui text minimal
}
function releases_opensuse(){
echo 15.0 15.1 15.2 15.3 15.4 microos tumbleweed
}
function releases_oraclelinux() {
echo 7.7 7.8 7.9 8.4 8.5 8.6 9.0
}
function releases_peppermint() {
echo latest
}
function editions_peppermint() {
echo devuan-xfce devuan-gnome debian-xfce debian-gnome
}
function releases_popos() {
echo 20.04 21.10 22.04
}
function editions_popos() {
echo intel nvidia
}
function releases_porteus() {
echo 5.0 5.01
}
function editions_porteus() {
echo cinnamon gnome kde lxde lxqt mate openbox xfce
}
function releases_reactos() {
echo latest
}
function releases_rebornos() {
echo latest
}
function get_rebornos() {
local ISO=$(wget -q -O- "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json" | jq -r ".url")
local HASH=$(wget -q -O- "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json" | jq -r ".md5")
echo "${ISO} ${HASH}"
}
function releases_rockylinux() {
echo 8.3 8.4 8.5 8.6 8.7 9.0 9.1
}
function editions_rockylinux() {
echo minimal dvd boot
}
function releases_siduction() {
echo latest
}
function editions_siduction() {
echo kde lxqt nox xfce xorg
}
function releases_slackware() {
echo 14.2 15.0
}
function releases_solus() {
echo 4.3
}
function editions_solus() {
echo Budgie GNOME MATE Plasma
}
function releases_spiral() {
echo latest
}
function editions_spiral() {
echo Plasma XFCE Mate LXQt Gnome Budgie Cinnamon Builder
}
function releases_tails() {
echo stable
}
function releases_tinycore() {
echo 14.0
}
function editions_tinycore() {
echo Core TinyCore CorePlus CorePure64 TinyCorePure64
}
function releases_trisquel() {
echo 10.0.1 11.0
}
function editions_trisquel() {
echo mate lxde kde sugar
}
function releases_truenas() {
if [[ $OS == truenas ]] ; then
echo "ERROR! The supported TrueNAS OS values are truenas-core or truenas-scale"
exit 1;
fi
}
function releases_truenas-core() {
echo 12.0 13.0
}
function releases_truenas-scale() {
echo 22.02 22.12
}
function releases_ubuntu() {
local VERSION_DATA="$(IFS=$'\n' wget -qO- https://api.launchpad.net/devel/ubuntu/series | jq -r '.entries[]')"
local SUPPORTED_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Supported" or .status=="Current Stable Release") | .version' <<<${VERSION_DATA} | sort))
local EOL_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Obsolete") | .version' <<<${VERSION_DATA} | sort))
local LTS_SUPPORT=()
local INTERIM_SUPPORT=()
for i in "${SUPPORTED_VERSIONS[@]}"; do
if [[ $(expr ${i%.*} % 2) == 0 && ${i#*.} == "04" ]]; then
LTS_SUPPORT+=($i)
else
INTERIM_SUPPORT+=($i)
fi
done
case "${OS}" in
edubuntu|ubuntu-unity|ubuntucinnamon)
echo ${INTERIM_SUPPORT[@]} daily-live
;;
kubuntu|lubuntu|ubuntukylin|ubuntu-mate|ubuntustudio|xubuntu)
## after 14.04
echo ${LTS_SUPPORT[@]:1} ${INTERIM_SUPPORT[@]} daily-live jammy-daily ${EOL_VERSIONS[@]/#/eol-}
;;
ubuntu-budgie)
#after 16.04
echo ${LTS_SUPPORT[@]:2} ${INTERIM_SUPPORT[@]} daily-live jammy-daily ${EOL_VERSIONS[@]/#/eol-}
;;
ubuntu)
echo ${LTS_SUPPORT[@]} ${INTERIM_SUPPORT[@]} daily-live ${EOL_VERSIONS[@]/#/eol-}
;;
esac
}
function releases_ubuntu-server() {
local ALL_VERSIONS=($(IFS=$'\n' wget -qO- http://releases.ubuntu.com/streams/v1/com.ubuntu.releases:ubuntu-server.json | jq -r '.products[] | select(.arch=="amd64") | .version'))
local LTS_SUPPORT=()
local INTERIM_SUPPORT=()
for i in "${!ALL_VERSIONS[@]}"; do
if [[ $i == 0 || ${ALL_VERSIONS[$i]} > ${ALL_VERSIONS[$(expr $i - 1)]} ]]; then
if [[ $(expr ${ALL_VERSIONS[${i}]%.*} % 2) == 0 && ${ALL_VERSIONS[${i}]#*.} == "04" ]]; then
LTS_SUPPORT+=(${ALL_VERSIONS[$i]})
else
INTERIM_SUPPORT+=(${ALL_VERSIONS[$i]})
fi
else
break
fi
done
echo ${LTS_SUPPORT[@]} ${INTERIM_SUPPORT[@]} daily-live
}
function releases_vanillaos() {
echo 22.10
}
function releases_void() {
echo current
}
function editions_void() {
echo glibc musl xfce-glibc xfce-musl
}
function releases_vxlinux() {
wget -q https://github.com/VX-Linux/main/releases/latest -O- | grep -o -e 'releases/tag/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]' | head -1 | cut -d/ -f3
}
function releases_windows() {
echo 8 10 11
}
function releases_xerolinux() {
echo kde
}
function releases_zorin() {
echo 16
}
function editions_zorin() {
echo core64 lite64 education64 edulite64
}
function check_hash() {
local iso=""
local hash=""
local hash_algo=""
iso="${VM_PATH}/${1}"
hash="${2}"
# Guess the hash algorithm by the hash length
case ${#hash} in
32) hash_algo=md5sum;;
40) hash_algo=sha1sum;;
64) hash_algo=sha256sum;;
128) hash_algo=sha512sum;;
*) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash."
return;;
esac
echo -n "Checking ${iso} with ${hash_algo}... "
if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then
echo "ERROR!"
echo "${iso} doesn't match ${hash}. Try running 'quickget' again."
exit 1
else
echo "Good!"
fi
}
function web_get() {
local DIR="${2}"
local FILE=""
local URL="${1}"
if [ -n "${3}" ]; then
FILE="${3}"
else
FILE="${URL##*/}"
fi
# Test mode for ISO
if [ "${show_iso_url}" == 'on' ]; then
echo "${URL}"
exit 0
elif [ "${test_iso_url}" == 'on' ]; then
wget --spider "${URL}"
exit 0
fi
if ! mkdir -p "${DIR}" 2>/dev/null; then
echo "ERROR! Unable to create directory ${DIR}"
exit 1
fi
if command -v aria2c &>/dev/null; then
if ! aria2c --stderr -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" --dir "${DIR}" -o "${FILE}"; then
echo #Necessary as aria2c in suppressed mode does not have new lines
echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again."
exit 1
fi
echo #Necessary as aria2c in suppressed mode does not have new lines
elif ! wget --quiet --continue --tries=3 --read-timeout=10 --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
echo "ERROR! Failed to download ${URL} with wget. Try running 'quickget' again."
exit 1
fi
}
function zsync_get() {
local DIR="${2}"
local FILE="${1##*/}"
local OUT=""
local URL="${1}"
# Test mode for ISO
if [ "${show_iso_url}" == 'on' ]; then
echo "${URL}"
exit 0
elif [ "${test_iso_url}" == 'on' ]; then
wget --spider "${URL}"
exit 0
elif command -v zsync &>/dev/null; then
if [ -n "${3}" ]; then
OUT="${3}"
else
OUT="${FILE}"
fi
if ! mkdir -p "${DIR}" 2>/dev/null; then
echo "ERROR! Unable to create directory ${DIR}"
exit 1
fi
# Only force http for zsync - not earlier because we might fall through here
if ! zsync "${URL/https/http}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then
echo "ERROR! Failed to download ${URL/https/http}.zsync"
exit 1
fi
if [ -e "${DIR}/${OUT}.zs-old" ]; then
rm "${DIR}/${OUT}.zs-old"
fi
else
echo "INFO: zsync not found, falling back to wget/aria2c"
if [ -n "${3}" ]; then
web_get "${1}" "${2}" "${3}"
else
web_get "${1}" "${2}"
fi
fi
}
function make_vm_config() {
local CONF_FILE=""