forked from quickemu-project/quickemu
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'qf-e-distros' Add E distributions (except easyos issue #9)
- Loading branch information
Showing
5 changed files
with
435 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
#!/usr/bin/bash | ||
# | ||
# This template identifies the functions required to supported by each OS | ||
|
||
#function create_vm() { | ||
# # This function can be used to over rid the standard function in quickget | ||
# # if you distribution requires something special. Windows and Mac are examples.. | ||
#} | ||
|
||
# This function returns an associative array with keys "url", "iso", and "hash" | ||
# Change this function for your distro | ||
function get_distro_info() { | ||
declare -A distro_info | ||
local url_base="https://cdimage.ubuntu.com/edubuntu" | ||
local hash_url | ||
local data | ||
|
||
case "${RELEASE}" in | ||
daily-live) | ||
distro_info['url']="${url_base}/${RELEASE}/current" | ||
hash_url="${url_base}/${RELEASE}/current" | ||
;; | ||
*) distro_info['url']="https://cdimage.ubuntu.com/edubuntu/releases/${RELEASE}/release" | ||
hash_url="https://cdimage.ubuntu.com/edubuntu/releases/${RELEASE}/release" | ||
;; | ||
esac | ||
|
||
if wget -q --spider "${hash_url}/SHA256SUMS"; then | ||
data=$(wget -qO- "${hash_url}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac") | ||
distro_info['iso']=$(cut -d'*' -f2 <<<${data} | sed '1q;d') | ||
distro_info['hash']=$(cut -d' ' -f1 <<<${data} | sed '1q;d') | ||
else | ||
data=$(wget -qO- "${hash_url}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac") | ||
distro_info['iso']=$(cut -d'*' -f2 <<<${data}) | ||
distro_info['hash']=$(cut -d' ' -f1 <<<${data}) | ||
fi | ||
|
||
for key in "${!distro_info[@]}"; do | ||
echo "${key}" "${distro_info[${key}]}" | ||
done | ||
} | ||
|
||
#function get_file() { | ||
# # This function can be used to over rid the standard function in quickget | ||
# # if you distribution requires something special. Windows and Mac are examples.. | ||
#} | ||
|
||
# This function returns supported OS releases for the OS | ||
# Change this function for your distro | ||
function releases() { | ||
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 | ||
|
||
echo "${interim_support[@]} daily-live" | ||
} | ||
|
||
# This function returns an associative array with releases as the key | ||
# and a "!" separated string of valid editions for the specific release. | ||
# While quite often editions are the same for all releases it is not always | ||
# the case. | ||
# Editions have different meanings for different OS's | ||
# Change this function for your distro | ||
function editions() { | ||
declare -A editions | ||
local release | ||
|
||
for release in $(releases); do | ||
editions[${release}]="" | ||
done | ||
|
||
for key in "${!editions[@]}"; do | ||
echo "${key}" "${editions[${key}]}" | ||
done | ||
} | ||
|
||
# Change this function for your distro | ||
# Returning 0 means editions are required and 1 not required | ||
function editions_required() { | ||
return 1 | ||
} | ||
|
||
# This function returns an expanded OS name for pretty printing | ||
# Change this function for your distro | ||
function pretty_name() { | ||
echo "Edubuntu Linux" | ||
} | ||
|
||
# This function returns the OS's home page URL | ||
# Change this function for your distro | ||
function homepage() { | ||
echo "https://www.edubuntu.org/" | ||
} | ||
|
||
# This function creates the vm_config file and can be used to | ||
# replace the default one in the quickget | ||
# Change this function for your distro | ||
function make_vm_config() { | ||
default_vm_config | ||
|
||
# Override any default settings | ||
#sed -i 's/^disk_size=.*/disk_size=\"80G\"/' "${VM_PATH}".conf | ||
|
||
# Add any additional lines | ||
# { | ||
# printf "fixed_iso=\"%s\"\n" ${fixed_iso} | ||
# | ||
# } >> "${VM_PATH}.conf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#!/usr/bin/bash | ||
# | ||
# This template identifies the functions required to supported by each OS | ||
|
||
#function create_vm() { | ||
# # This function can be used to over rid the standard function in quickget | ||
# # if you distribution requires something special. Windows and Mac are examples.. | ||
#} | ||
|
||
# This function returns an associative array with keys "url", "iso", and "hash" | ||
# Change this function for your distro | ||
function get_distro_info() { | ||
declare -A distro_info | ||
|
||
case ${RELEASE} in | ||
7.0) | ||
distro_info['iso']="MTcwNzQ1OTIyMAo=/elementaryos-7.0-stable.20230129rc.iso" | ||
distro_info['hash']="None" | ||
;; | ||
7.1) | ||
distro_info['iso']="MTcwNzQ1NzE4Mg==/elementaryos-${RELEASE}-stable.20230926rc.iso" | ||
distro_info['hash']="5c7f6b388e5787c366587985301ea05ab16e4cc0de3be2b3d6a559ce81a2f102" | ||
;; | ||
esac | ||
distro_info['url']="https://ams3.dl.elementary.io/download" | ||
|
||
for key in "${!distro_info[@]}"; do | ||
echo "${key}" "${distro_info[${key}]}" | ||
done | ||
} | ||
|
||
#function get_file() { | ||
# # This function can be used to over rid the standard function in quickget | ||
# # if you distribution requires something special. Windows and Mac are examples.. | ||
#} | ||
|
||
# This function returns supported OS releases for the OS | ||
# Change this function for your distro | ||
function releases() { | ||
echo 7.0 7.1 | ||
} | ||
|
||
# This function returns an associative array with releases as the key | ||
# and a "!" separated string of valid editions for the specific release. | ||
# While quite often editions are the same for all releases it is not always | ||
# the case. | ||
# Editions have different meanings for different OS's | ||
# Change this function for your distro | ||
function editions() { | ||
declare -A editions | ||
local release | ||
|
||
for release in $(releases); do | ||
editions[${release}]="" | ||
done | ||
|
||
for key in "${!editions[@]}"; do | ||
echo "${key}" "${editions[${key}]}" | ||
done | ||
} | ||
|
||
# Change this function for your distro | ||
# Returning 0 means editions are required and 1 not required | ||
function editions_required() { | ||
return 1 | ||
} | ||
|
||
# This function returns an expanded OS name for pretty printing | ||
# Change this function for your distro | ||
function pretty_name() { | ||
echo "elementary OS" | ||
} | ||
|
||
# This function returns the OS's home page URL | ||
# Change this function for your distro | ||
function homepage() { | ||
echo "https://elementary.io/" | ||
} | ||
|
||
# This function creates the vm_config file and can be used to | ||
# replace the default one in the quickget | ||
# Change this function for your distro | ||
function make_vm_config() { | ||
default_vm_config | ||
|
||
# Override any default settings | ||
#sed -i 's/^disk_size=.*/disk_size=\"80G\"/' "${VM_PATH}".conf | ||
|
||
# Add any additional lines | ||
# { | ||
# printf "fixed_iso=\"%s\"\n" ${fixed_iso} | ||
# | ||
# } >> "${VM_PATH}.conf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#!/usr/bin/bash | ||
# | ||
# This template identifies the functions required to supported by each OS | ||
|
||
#function create_vm() { | ||
# # This function can be used to over rid the standard function in quickget | ||
# # if you distribution requires something special. Windows and Mac are examples.. | ||
#} | ||
|
||
# This function returns an associative array with keys "url", "iso", and "hash" | ||
# Change this function for your distro | ||
function get_distro_info() { | ||
declare -A distro_info | ||
|
||
distro_info['iso']="$( grep -i "${RELEASE}" < "${TMPDIR}"/iso )" | ||
distro_info['url']="https://mirrors.gigenet.com/endeavouros/iso" | ||
distro_info['hash']=$(wget -q -O- "${distro_info['url']}/${distro_info['iso']}.sha512sum" | cut -d' ' -f1) | ||
|
||
for key in "${!distro_info[@]}"; do | ||
echo "${key}" "${distro_info[${key}]}" | ||
done | ||
} | ||
|
||
#function get_file() { | ||
# # This function can be used to over rid the standard function in quickget | ||
# # if you distribution requires something special. Windows and Mac are examples.. | ||
#} | ||
|
||
# This function returns supported OS releases for the OS | ||
# Change this function for your distro | ||
function releases() { | ||
curl -s https://mirrors.gigenet.com/endeavouros/iso/ \ | ||
| grep 'href="E' \ | ||
| cut -f 2 -d '"' \ | ||
| grep 'iso$' > "${TMPDIR}"/iso | ||
|
||
{ | ||
sed -e 's/^.*[O|o][S|s][_-]//' -e 's/\.iso//' | sort | ||
} < "${TMPDIR}"/iso | ||
} | ||
|
||
# This function returns an associative array with releases as the key | ||
# and a "!" separated string of valid editions for the specific release. | ||
# While quite often editions are the same for all releases it is not always | ||
# the case. | ||
# Editions have different meanings for different OS's | ||
# Change this function for your distro | ||
function editions() { | ||
declare -A editions | ||
local release | ||
|
||
for release in $(releases); do | ||
editions[${release}]="" | ||
done | ||
|
||
for key in "${!editions[@]}"; do | ||
echo "${key}" "${editions[${key}]}" | ||
done | ||
} | ||
|
||
# Change this function for your distro | ||
# Returning 0 means editions are required and 1 not required | ||
function editions_required() { | ||
return 1 | ||
} | ||
|
||
# This function returns an expanded OS name for pretty printing | ||
# Change this function for your distro | ||
function pretty_name() { | ||
echo "EndeavourOS" | ||
} | ||
|
||
# This function returns the OS's home page URL | ||
# Change this function for your distro | ||
function homepage() { | ||
echo "https://endeavouros.com/" | ||
} | ||
|
||
# This function creates the vm_config file and can be used to | ||
# replace the default one in the quickget | ||
# Change this function for your distro | ||
function make_vm_config() { | ||
default_vm_config | ||
|
||
# Override any default settings | ||
#sed -i 's/^disk_size=.*/disk_size=\"80G\"/' "${VM_PATH}".conf | ||
|
||
# Add any additional lines | ||
# { | ||
# printf "fixed_iso=\"%s\"\n" ${fixed_iso} | ||
# | ||
# } >> "${VM_PATH}.conf" | ||
} |
Oops, something went wrong.