mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Add Downloader field to quickget
This will inform frontend GUIs what download mechanism will be used to get the requested OS.
This commit is contained in:
parent
528064383b
commit
584c855ec3
1 changed files with 16 additions and 4 deletions
20
quickget
20
quickget
|
@ -77,11 +77,12 @@ function list_json() {
|
|||
|
||||
function list_csv() {
|
||||
local DISPLAY_NAME
|
||||
local DOWNLOADER
|
||||
local FUNC
|
||||
local LANG
|
||||
local OS
|
||||
local RELEASE
|
||||
echo "Display Name,OS,Release,Option"
|
||||
echo "Display Name,OS,Release,Option,Downloader"
|
||||
for OS in $(os_support); do
|
||||
DISPLAY_NAME="$(pretty_name "${OS}")"
|
||||
if [[ "${OS}" == *"ubuntu"* ]]; then
|
||||
|
@ -93,16 +94,27 @@ function list_csv() {
|
|||
fi
|
||||
|
||||
for RELEASE in $("releases_${FUNC}"); do
|
||||
|
||||
if [ "${OS}" == "macos" ]; then
|
||||
DOWNLOADER="macrecovery"
|
||||
elif [ "${OS}" == "ubuntu" ] && [ ${RELEASE} == "canary" ]; then
|
||||
DOWNLOADER="zsync"
|
||||
elif [[ "${OS}" == *"ubuntu"* ]] && [ ${RELEASE} == "devel" ]; then
|
||||
DOWNLOADER="zsync"
|
||||
else
|
||||
DOWNLOADER="wget"
|
||||
fi
|
||||
|
||||
if [ "${OS}" == "windows" ]; then
|
||||
for LANG in "${LANGS[@]}"; do
|
||||
echo "${DISPLAY_NAME},${OS},${RELEASE},${LANG}"
|
||||
echo "${DISPLAY_NAME},${OS},${RELEASE},${LANG},${DOWNLOADER}"
|
||||
done
|
||||
elif [ "${OS}" == "popos" ]; then
|
||||
for DRIVER in intel nvidia; do
|
||||
echo "${DISPLAY_NAME},${OS},${RELEASE},${DRIVER}"
|
||||
echo "${DISPLAY_NAME},${OS},${RELEASE},${DRIVER},${DOWNLOADER}"
|
||||
done
|
||||
else
|
||||
echo "${DISPLAY_NAME},${OS},${RELEASE},"
|
||||
echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER}"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue