Skip to content

Commit

Permalink
🐞 FIX: Issue #8 bash syntax for older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dabrown645 committed Feb 8, 2024
1 parent ca14e41 commit 1c46619
Show file tree
Hide file tree
Showing 18 changed files with 156 additions and 41 deletions.
8 changes: 6 additions & 2 deletions quickget_plugins/alma.plug
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ function get_distro_info() {
distro_info['iso']="AlmaLinux-${RELEASE}-latest-x86_64-${EDITION}.iso"
distro_info['hash']="$(wget -q -O- "${distro_info['url']}"/CHECKSUM | grep \("${distro_info['iso']}"\) | cut -d' ' -f4)"

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -45,7 +47,9 @@ function editions() {
editions[${release}]="boot!minimal!dvd"
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/alpine.plug
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ function get_distro_info() {
distro_info['iso']="alpine-virt-${version}-x86_64.iso"
distro_info['hash']=$(wget -qO- "${distro_info['url']}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -51,7 +53,9 @@ function editions() {
editions[${release}]=""
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
46 changes: 45 additions & 1 deletion quickget_plugins/android.plug
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,51 @@ function get_distro_info() {
fi
done

echo "${distro_info[@]@k}"
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 latest
}

# 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}]="boot!minimal!dvd"
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 0
}

# This function returns an expanded OS name for pretty printing
# Change this function for your distro
function pretty_name() {
echo "Alma Linux"
}

# Use this function to override the standard function in quickget
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/archcraft.plug
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ function get_distro_info() {
distro_info['iso']=${fullrul##*/}
distro_info['hash']="$(wget -q -O- "${fullrul}.sha256sum" | cut -d " " -f1)"

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -50,7 +52,9 @@ function editions() {
editions[${release}]=""
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/archlinux.plug
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ function get_distro_info() {
distro_info['iso']=$(wget -q -O- "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].iso_url')
distro_info['hash']=$(wget -q -O- "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].sha256_sum')

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -47,7 +49,9 @@ function editions() {
editions[${release}]=""
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
9 changes: 7 additions & 2 deletions quickget_plugins/arcolinuxb.plug
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ function get_distro_info() {
distro_info['url']="https://ant.seedhost.eu/arcolinux/iso"
distro_info['iso']="${RELEASE}/arcolinuxb-${EDITION}-${RELEASE}-x86_64.iso"
distro_info['hash']="$(curl -s "${distro_info['url']}/${distro_info['iso']}.sha256" | cut -d' ' -f1)"
echo "${distro_info[@]@k}"

for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -57,7 +60,9 @@ function editions() {
editions['v24.01.04']="hyprland!wayfire"
editions['v24.02.01']="hyprland!sway!wayfire"

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
9 changes: 7 additions & 2 deletions quickget_plugins/arcolinuxd.plug
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ function get_distro_info() {
distro_info['url']="https://ant.seedhost.eu/arcolinux/iso"
distro_info['iso']="${RELEASE}/arcolinuxd-${RELEASE}-x86_64.iso"
distro_info['hash']="$(curl -s "${distro_info['url']}/${distro_info['iso']}.sha256" | cut -d' ' -f1)"
echo "${distro_info[@]@k}"

for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -66,7 +69,9 @@ function editions() {
editions['v24.01.04']=""
editions['v24.02.01']=""

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
11 changes: 8 additions & 3 deletions quickget_plugins/arcolinuxl.plug
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ function get_distro_info() {
distro_info['url']="https://ant.seedhost.eu/arcolinux/iso"
distro_info['iso']="${RELEASE}/arcolinuxl-${RELEASE}-x86_64.iso"
distro_info['hash']="$(curl -s "${distro_info['url']}/${distro_info['iso']}.sha256" | cut -d' ' -f1)"
echo "${distro_info[@]@k}"

for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand All @@ -27,7 +30,7 @@ function get_distro_info() {
# This function returns supported OS releases for the OS
# Change this function for your distro
function releases() {
echo v22.01.10 v22.03.07 v22.04.02 v22.05.02 v22.06.07 v22.07.03 v22.09.04 v22.10.02 v22.11.02 v22.12.02 v23.01.03 v23.02.02 v23.03.01 v23.04.03 v23.05.04 v23.06.02 v23.07.01 v23.09.03 v23.10.01 v23.11.03 v23.12.03 v24.01.04 v24.02.01
echo v22.01.10 v22.03.07 v22.04.02 v22.05.02 v22.06.07 v22.07.03 v22.09.04 v22.10.02 v22.11.02 v22.12.02 v23.01.03 v23.02.02 v23.03.01 v23.04.03 v23.05.04 v23.06.02 v23.07.01 v23.09.03 v23.10.01 v23.11.03 v23.12.03 v24.01.04
}

# This function returns an associative array with releases as the key
Expand Down Expand Up @@ -66,7 +69,9 @@ function editions() {
editions['v24.01.04']=""
editions['v24.02.01']=""

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
11 changes: 8 additions & 3 deletions quickget_plugins/arcolinuxs.plug
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ function get_distro_info() {
distro_info['iso']="${RELEASE}/arcolinuxs-${EDITION}-${RELEASE}-x86_64.iso"
fi
distro_info['hash']="$(curl -s "${distro_info['url']}/${distro_info['iso']}.sha256" | cut -d' ' -f1)"
echo "${distro_info[@]@k}"

for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand All @@ -31,7 +34,7 @@ function get_distro_info() {
# This function returns supported OS releases for the OS
# Change this function for your distro
function releases() {
echo v22.01.10 v22.03.07 v22.04.02 v22.05.02 v22.06.07 v22.07.03 v22.09.04 v22.10.02 v22.11.02 v22.12.02 v23.01.03 v23.02.02 v23.03.01 v23.04.03 v23.05.04 v23.06.02 v23.07.01 v23.09.03 v23.10.01 v23.11.03 v23.12.03 v24.01.04 v24.02.01
echo v22.01.10 v22.03.07 v22.04.02 v22.05.02 v22.06.07 v22.07.03 v22.09.04 v22.10.02 v22.11.02 v22.12.02 v23.01.03 v23.02.02 v23.03.01 v23.04.03 v23.05.04 v23.06.02 v23.07.01 v23.09.03 v23.10.01 v23.11.03 v23.12.03 v24.01.04
}

# This function returns an associative array with releases as the key
Expand Down Expand Up @@ -70,7 +73,9 @@ function editions() {
editions['v24.01.04']="base!lts!hardend!zen"
editions['v24.02.01']="base!lts!hardend!zen"

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/batocera.plug
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ function get_distro_info() {
distro_info['iso']="$(curl -sl "${distro_info['url']}"/ | grep -e 'batocera.*img.gz'|cut -d\" -f2)"
#set +x

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -71,7 +73,9 @@ function editions() {
editions[${release}]="boot!minimal!dvd"
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/blendos.plug
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function get_distro_info() {
distro_info['hash']="$(wget -q -O- "${distro_info['url']}"/"${EDITION}"/"${release}"/update.iso.sha512sum/download \
| cut -d' ' -f1)"

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -65,7 +67,9 @@ function editions() {
editions[${release}]=$(grep "${release}" "${TMPDIR}"/blendos.info | cut -f 2 -d " " | sort -u | tr "\n" "!" | sed "s/!$//")
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/bodhi.plug
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ function get_distro_info() {
esac
distro_info['hash']=$(wget -q -O- "${distro_info['url']}/${distro_info['iso']}.sha256" | cut -d' ' -f1)

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -49,7 +51,9 @@ function editions() {
editions[${release}]="standard!hwe!s76"
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/bunsenlabs.plug
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ function get_distro_info() {
distro_info['url']="https://ddl.bunsenlabs.org/ddl"
distro_info['iso']="beryllium-1-amd64.hybrid.iso"
distro_info['hash']="$(wget -q -O- "${distro_info['url']}/release.sha256.txt" | head -1 | cut -d' ' -f1)"

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -45,7 +47,9 @@ function editions() {
editions[${release}]=""
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/cachyos.plug
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ function get_distro_info() {
distro_info['iso']="cachyos-${EDITION}-linux-${RELEASE}.iso"
distro_info['hash']="$(wget -q -O- "${distro_info['url']}/${distro_info['iso']}.sha256" | cut -d' ' -f1)"

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -45,7 +47,9 @@ function editions() {
editions[${release}]="gnome!kde"
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
8 changes: 6 additions & 2 deletions quickget_plugins/centos-stream.plug
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ function get_distro_info() {
;;
esac

echo "${distro_info[@]@k}"
for key in "${!distro_info[@]}"; do
echo "${key}" "${distro_info[${key}]}"
done
}

# Use this function to override the standard function in quickget
Expand Down Expand Up @@ -54,7 +56,9 @@ function editions() {
editions[${release}]="boot!dvd1"
done

echo "${editions[@]@k}"
for key in "${!editions[@]}"; do
echo "${key}" "${editions[${key}]}"
done
}

# Change this function for your distro
Expand Down
Loading

0 comments on commit 1c46619

Please sign in to comment.