From 3dda07147bf5c4ef9f2b08f113fe59cdc867b831 Mon Sep 17 00:00:00 2001 From: Martin Wimpress <304639+flexiondotorg@users.noreply.github.com> Date: Tue, 7 May 2024 00:35:59 +0100 Subject: [PATCH] Updated 06 Advanced quickget features (markdown) --- 06-Advanced-quickget-features.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/06-Advanced-quickget-features.md b/06-Advanced-quickget-features.md index d2e6c0f..1468624 100644 --- a/06-Advanced-quickget-features.md +++ b/06-Advanced-quickget-features.md @@ -26,4 +26,34 @@ Arguments: --list-json (-lj) : List everything in json format -------------------------------------------------------------------------------- *info: 1=Logo 2=Based of 3=Credentials 4=Homepage 5=Short info - Can be used in any combination like -13254 or -52``` + Can be used in any combination like -13254 or -52 +``` + +# Adding a new OS to quickget + +Here's the quick 'n dirty guide to adding a new OS to `quickget` + + 1. Update `os_support()` - add new OS, all lowercase + 2. Update `os_info()` - Fill all possible fields for the new OS: Here's an example: + +```shell + ) INFO="||||";; +``` + + 3. Create a `releases_newos()` generator (required) outputs the current supported release versions, starting with the newest. + 4. Create a `editions_newos()` generator (optional) outputs the editions if new OS has multiple flavours/editions + 5. Update `make_vm_config()` - add any *required* new OS tweaks + 6. Create a `get_newos()` function - This echoes the URL to the ISO and HASH. See the other existing functions for reference, but here's an simple example. + +```shell +function get_newos() { + local HASH="" + local ISO="" + local URL="" + + ISO="newos-${RELEASE}-${EDITION}-amd64.iso" + URL="https://www.newos.org/download/${RELEASE}/${EDITION}" + HASH=$(web_pipe "${URL}/SHA512SUMS" | grep "${ISO}" | cut_1) + echo "${URL}/${ISO} ${HASH}" +} +``` \ No newline at end of file