Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial gentoo support #255

Merged
merged 7 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ comprehensive support for macOS and Windows**.
* [Fedora](https://getfedora.org/) & openSUSE ([Leap](https://get.opensuse.org/leap/), [Tumbleweed](https://get.opensuse.org/tumbleweed/), [MicroOS](https://microos.opensuse.org/))
* [Alma Linux](https://almalinux.org/)
* [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE), [elementary OS](https://elementary.io/), [Pop!_OS](https://pop.system76.com/)
* [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/)
* [Arch Linux](https://www.archlinux.org/), [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/), [ZorinOS](https://zorin.com/os/), [NixOS](https://nixos.org/), [Gentoo Linux](https://www.gentoo.org/),
* [Oracle Linux](https://www.oracle.com/linux/) and [Rocky Linux](https://rockylinux.org/)
* [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and latest 2.0.0 pre-release )
* [FreeBSD](https://www.freebsd.org/) & [OpenBSD](https://www.openbsd.org/)
Expand Down Expand Up @@ -182,6 +182,7 @@ preferred flavour.
* `elementary`
* `fedora`
* `garuda`
* `gentoo`
* `kali`
* `kdeneon`
* `linuxmint`
Expand Down
36 changes: 36 additions & 0 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function pretty_name() {
archlinux) PRETTY_NAME="Arch Linux";;
elementary) PRETTY_NAME="elementary OS";;
freebsd) PRETTY_NAME="FreeBSD";;
gentoo) PRETTY_NAME="Gentoo";;
garuda) PRETTY_NAME="Garuda Linux";;
kdeneon) PRETTY_NAME="KDE Neon";;
linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";;
Expand Down Expand Up @@ -129,6 +130,8 @@ function list_csv() {
DOWNLOADER="${DL}"
elif [ "${OS}" == "garuda" ]; then
DOWNLOADER="${DL}"
elif [ "${OS}" == "gentoo" ]; then
DOWNLOADER="${DL}"
elif [[ "${OS}" == *"kdeneon"* ]]; then
DOWNLOADER="${DL}"
else
Expand Down Expand Up @@ -168,6 +171,7 @@ function os_support() {
freebsd \
fedora \
garuda \
gentoo \
kali \
kdeneon \
kubuntu \
Expand Down Expand Up @@ -245,6 +249,10 @@ function releases_fedora(){
35
}

function releases_gentoo(){
echo latest
}

function releases_garuda() {
echo bspwm \
dr460nized \
Expand Down Expand Up @@ -537,6 +545,9 @@ function make_vm_config() {
elif [ "${OS}" == "garuda" ]; then
GUEST="linux"
IMAGE_TYPE="iso"
elif [ "${OS}" == "gentoo" ]; then
GUEST="linux"
IMAGE_TYPE="iso"
elif [ "${OS}" == "kdeneon" ]; then
GUEST="linux"
IMAGE_TYPE="iso"
Expand Down Expand Up @@ -793,6 +804,27 @@ function get_fedora() {
make_vm_config "${ISO}"
}

function get_gentoo() {
local HASH=""
local ISO=""
local URL=""
local LOCAT=""
local INSTALLMIN=""

validate_release "releases_gentoo"
eval $( wget -O/tmp/gentoolatest https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/${RELEASE}-iso.txt 2>&1 |grep Location | awk '{print "LOCAT="$2}' )
LOCAT=$(dirname ${LOCAT})
eval $( awk '/admincd-amd64/ {print "ADMIN="$1}; /install-amd64-minimal/ {print "INSTALLMIN="$1}' /tmp/gentoolatest )
URL="${LOCAT}/${INSTALLMIN}"
ISO=$(basename "${INSTALLMIN}" )


web_get "${URL}" "${VM_PATH}"
HASH=$(wget -q -O- ${LOCAT}/${INSTALLMIN}.DIGESTS|grep -e iso|grep -v -e CONT -e catalyst|cut -d\ -f1)
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}

function get_kali() {
local HASH=""
local ISO=""
Expand Down Expand Up @@ -1653,6 +1685,8 @@ if [ -n "${2}" ]; then
get_fedora
elif [ "${OS}" == "garuda" ]; then
get_garuda
elif [ "${OS}" == "gentoo" ]; then
get_gentoo
elif [ "${OS}" == "kali" ]; then
get_kali
elif [ "${OS}" == "kdeneon" ]; then
Expand Down Expand Up @@ -1744,6 +1778,8 @@ else
releases_fedora
elif [ "${OS}" == "garuda" ]; then
releases_garuda
elif [ "${OS}" == "gentoo" ]; then
releases_gentoo
elif [ "${OS}" == "kali" ]; then
releases_kali
elif [[ "${OS}" == *"linuxmint-"* ]]; then
Expand Down