diff --git a/quickget b/quickget index 293b7dd..caf4984 100755 --- a/quickget +++ b/quickget @@ -11,11 +11,6 @@ function cleanup() { fi } -# Get string before first whitespace (HASH) -function cut_1() { - cut -d' ' -f1 -} - function os_info() { local SIMPLE_NAME="" local INFO="" @@ -425,7 +420,7 @@ function test_all() { if [[ $(type -t "editions_${OS}") == function ]]; then for EDITION in $(editions_"${OS}"); do validate_release releases_"${OS}" - URL=$(get_"${OS}" | cut_1 | head -1) + URL=$(get_"${OS}" | cut -d' ' -f1 | head -1) if [ "${OPERATION}" == "show" ]; then test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" elif [ "${OPERATION}" == "test" ]; then @@ -454,7 +449,7 @@ function test_all() { (get_ubuntu) else validate_release releases_"${OS}" - URL=$(get_"${OS}" | cut_1 | head -1) + URL=$(get_"${OS}" | cut -d' ' -f1 | head -1) if [ "${OPERATION}" == "show" ]; then test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" elif [ "${OPERATION}" == "test" ]; then @@ -1604,7 +1599,7 @@ function get_antix() { full-*) ISO+="_x64-full.iso";; net-*) ISO+="-net_x64-net.iso";; esac - HASH=$(web_pipe "${URL}/${README}.txt" | grep "${ISO}" | cut_1 | head -1) + HASH=$(web_pipe "${URL}/${README}.txt" | grep "${ISO}" | cut -d' ' -f1 | head -1) echo "${URL}/${ISO} ${HASH}" } @@ -1628,7 +1623,7 @@ function get_arcolinux() { local HASH="" local ISO="arcolinux${EDITION:0:1}-${RELEASE}-x86_64.iso" local URL="https://mirror.accum.se/mirror/arcolinux.info/iso/${RELEASE}" - HASH=$(web_pipe "${URL}/${ISO}.sha1" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha1" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1645,7 +1640,7 @@ function get_athenaos() { local HASH="" local URL="https://github.com/Athena-OS/athena/releases/download/${RELEASE}" local ISO="athena-rolling-x86_64.iso" - HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1689,7 +1684,7 @@ function get_bodhi() { standard) ISO="bodhi-${RELEASE}-64.iso";; *) ISO="bodhi-${RELEASE}-64-${EDITION}.iso";; esac - HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1697,7 +1692,7 @@ function get_bunsenlabs() { local HASH="" local ISO="boron-1-240123-amd64.hybrid.iso" local URL="https://ddl.bunsenlabs.org/ddl" - HASH=$(web_pipe "${URL}/release.sha256.txt" | head -1 | cut_1) + HASH=$(web_pipe "${URL}/release.sha256.txt" | head -1 | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1707,7 +1702,7 @@ function get_cachyos() { local URL="https://mirror.cachyos.org/ISO/${EDITION}/" REL=$(web_pipe "${URL}" | grep -Po '(?<=">)[0-9]+(?=/)' | sort -ru | tail -n 1) local ISO="cachyos-${EDITION}-linux-${REL}.iso" - HASH=$(web_pipe "${URL}/${REL}/${ISO}.sha256" | cut_1) + HASH=$(web_pipe "${URL}/${REL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${REL}/${ISO} ${HASH}" } @@ -1725,7 +1720,7 @@ function get_chimeralinux() { local URL="https://repo.chimera-linux.org/live/${RELEASE}" DATE=$(web_pipe "${URL}/sha256sums.txt" | head -n1 | cut -d'-' -f5) local ISO="chimera-linux-x86_64-LIVE-${DATE}-${EDITION}.iso" - HASH=$(web_pipe "${URL}/sha256sums.txt" | grep 'x86_64-LIVE' | grep "${EDITION}" | cut_1) + HASH=$(web_pipe "${URL}/sha256sums.txt" | grep 'x86_64-LIVE' | grep "${EDITION}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1750,7 +1745,7 @@ function get_debian() { URL="${URL/hybrid/cd}" ISO="${ISO/-live/}" fi - HASH=$(web_pipe "${URL}/SHA512SUMS" | grep "${ISO}" | cut_1 | head -1) + HASH=$(web_pipe "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1 | head -1) echo "${URL}/${ISO} ${HASH}" } @@ -1766,7 +1761,7 @@ function get_deepin() { REV="1010" fi local ISO="deepin-desktop-community-${REV}-amd64.iso" - HASH=$(web_pipe "${URL}/SHA256SUMS" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/SHA256SUMS" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1781,7 +1776,7 @@ function get_devuan() { daedalus) VER="5.0.0";; esac ISO="devuan_${RELEASE}_${VER}_amd64_desktop-live.iso" - HASH=$(web_pipe "${URL}/SHASUMS.txt" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1804,7 +1799,7 @@ function get_easyos() { 5.7|5.6.7|5.6.6) YEAR="2024";; esac URL="https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/${YEAR}/${RELEASE}" - HASH=$(web_pipe "${URL}/md5.sum.txt" | cut_1) + HASH=$(web_pipe "${URL}/md5.sum.txt" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1827,7 +1822,7 @@ function get_endeavouros() { # Find EndeavourOS releases from mirror, pick one matching release ENDEAVOUR_RELEASES="$(web_pipe "${URL}/" | grep -o -P '(?<=)' | grep -v 'x86_64')" ISO="$(echo "${ENDEAVOUR_RELEASES}" | grep -i "${RELEASE}").iso" - HASH=$(web_pipe "${URL}/${ISO}.sha512sum" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha512sum" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1883,9 +1878,9 @@ function get_freedos() { local URL="http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/${RELEASE}/official" case ${RELEASE} in 1.2) ISO="FD12CD.iso" - HASH=$(web_pipe "${URL}/FD12.sha" | grep "${ISO}" | cut_1);; + HASH=$(web_pipe "${URL}/FD12.sha" | grep "${ISO}" | cut -d' ' -f1);; 1.3) ISO="FD13-LiveCD.zip" - HASH=$(web_pipe "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut_1);; + HASH=$(web_pipe "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1);; esac echo "${URL}/${ISO} ${HASH}" } @@ -1895,7 +1890,7 @@ function get_garuda() { local ISO="" local URL="https://iso.builds.garudalinux.org/iso/latest/garuda" ISO=${EDITION}/latest.iso - HASH="$(web_pipe "${URL}/${ISO}.sha256" | cut_1)" + HASH="$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1)" echo "${URL}/${ISO} ${HASH}" } @@ -1904,10 +1899,10 @@ function get_gentoo() { local ISO="" local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds" case ${EDITION} in - minimal) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep install | cut_1);; - livegui) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep livegui | cut_1);; + minimal) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1);; + livegui) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep livegui | cut -d' ' -f1);; esac - HASH=$(web_pipe "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1965,7 +1960,7 @@ function get_kali() { local ISO="" local URL="https://cdimage.kali.org/${RELEASE}" ISO=$(web_pipe "${URL}/?C=M;O=D" | grep -o ">kali-linux-.*-installer-amd64.iso" | head -n 1 | cut -c 2-) - HASH=$(web_pipe "${URL}/SHA256SUMS" | grep -v torrent | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/SHA256SUMS" | grep -v torrent | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1974,7 +1969,7 @@ function get_kdeneon() { local ISO="" local URL="https://files.kde.org/neon/images/${RELEASE}/current" ISO=$(web_pipe "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-) - HASH=$(web_pipe "${URL}/neon-${RELEASE}-current.sha256sum" | cut_1) + HASH=$(web_pipe "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1989,7 +1984,7 @@ function get_linuxlite() { local HASH="" local ISO="linux-lite-${RELEASE}-64bit.iso" local URL="https://sourceforge.net/projects/linux-lite/files/${RELEASE}" - HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -1997,7 +1992,7 @@ function get_linuxmint() { local HASH="" local ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso" local URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}" - HASH=$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2005,7 +2000,7 @@ function get_lmde() { local HASH="" local ISO="lmde-${RELEASE}-${EDITION}-64bit.iso" local URL="https://mirror.bytemark.co.uk/linuxmint/debian" - HASH=$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2145,7 +2140,7 @@ function get_mageia() { local HASH="" local ISO="" ISO=$(web_pipe https://www.mageia.org/en/downloads/get/?q="Mageia-${RELEASE}-Live-${EDITION}-x86_64.iso" | grep 'click here'| grep -o 'href=.*\.iso'|cut -d\" -f2) - HASH=$(web_pipe "${ISO}.sha512" | cut_1) + HASH=$(web_pipe "${ISO}.sha512" | cut -d' ' -f1) echo "${ISO} ${HASH}" } @@ -2175,7 +2170,7 @@ function get_manjaro() { else URL="$(echo "${MANIFEST}" | jq -r ."${TYPE}.${RELEASE}${EDITION}".image)" fi - HASH=$(web_pipe "${URL}.sha512" | cut_1) + HASH=$(web_pipe "${URL}.sha512" | cut -d' ' -f1) echo "${URL} ${HASH}" } @@ -2188,7 +2183,7 @@ function get_mxlinux() { KDE) ISO="MX-${RELEASE}_KDE_x64.iso";; Fluxbox) ISO="MX-${RELEASE}_fluxbox_x64.iso";; esac - HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2196,7 +2191,7 @@ function get_netboot() { local HASH="" local ISO="netboot.xyz.iso" local URL="https://boot.netboot.xyz/ipxe" - HASH=$(web_pipe "${URL}/netboot.xyz-sha256-checksums.txt" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/netboot.xyz-sha256-checksums.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2216,7 +2211,7 @@ function get_nitrux() { URLBASE="https://sourceforge.net/projects/nitruxos/files/Release" URL="${URLBASE}/ISO" ISO=$(web_pipe 'https://sourceforge.net/projects/nitruxos/rss?path=/Release/ISO' | grep '.iso' | head -1 | cut -d']' -f1 | cut -d '/' -f4) - HASH=$(web_pipe "${URLBASE}/MD5/${ISONAME}.md5sum" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URLBASE}/MD5/${ISONAME}.md5sum" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2224,7 +2219,7 @@ function get_nixos() { local HASH="" local ISO="latest-nixos-${EDITION}-x86_64-linux.iso" local URL="https://channels.nixos.org/nixos-${RELEASE}" - HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2250,7 +2245,7 @@ function get_openindiana() { local URL="" URL="https://dlc.openindiana.org/isos/hipster/${RELEASE}" ISO="OI-hipster-${EDITION}-${RELEASE}.iso" - HASH=$(web_pipe "${URL}/${ISO}.sha256" |cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha256" |cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2271,7 +2266,7 @@ function get_opensuse() { ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso" URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso" fi - HASH=$(web_pipe "${URL}/${ISO}.sha256" | awk '{if(NR==4) print $0}' | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha256" | awk '{if(NR==4) print $0}' | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2285,7 +2280,7 @@ function get_oraclelinux() { 7) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso";; *) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso";; esac - HASH=$(web_pipe "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2295,7 +2290,7 @@ function get_parrotsec() { local URL="" ISO="Parrot-${EDITION}-${RELEASE}_amd64.iso" URL="https://download.parrot.sh/parrot/iso/${RELEASE}" - HASH="$(web_pipe "${URL}/signed-hashes.txt" | grep "${ISO}" | cut_1)" + HASH="$(web_pipe "${URL}/signed-hashes.txt" | grep "${ISO}" | cut -d' ' -f1)" echo "${URL}/${ISO} ${HASH}" } @@ -2317,7 +2312,7 @@ function get_peppermint() { ISO="PeppermintOS-Debian_64_gfb.iso" URL="${URL}/Gnome_FlashBack";; esac - HASH=$(web_pipe "${URL}/${ISO}-sha512.checksum" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}-sha512.checksum" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2337,7 +2332,7 @@ function get_porteus() { edition="${EDITION~~}" ISO="Porteus-${edition}-v${RELEASE}-x86_64.iso" URL="https://mirrors.dotsrc.org/porteus/x86_64/Porteus-v${RELEASE}" - HASH=$(web_pipe "${URL}/sha256sums.txt" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/sha256sums.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2347,7 +2342,7 @@ function get_primtux() { local ISO="" ISO="PrimTux${RELEASE}-amd64-${EDITION}.iso" URL="https://sourceforge.net/projects/primtux/files/Distribution" - HASH=$(web_pipe "${URL}/${ISO}.md5" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.md5" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2402,7 +2397,7 @@ function get_siduction() { local ISO="" local URL="https://mirrors.dotsrc.org/siduction/iso/Standing_on_the_Shoulders_of_Giants/${EDITION}" DATE=$(web_pipe "${URL}"| grep .iso.md5 | cut -d'-' -f6 | cut -d'.' -f1) - HASH=$(web_pipe "${URL}/${ISO}.md5" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.md5" | cut -d' ' -f1) ISO="siduction-2023.1.1-Standing_on_the_Shoulders_of_Giants-${EDITION}-amd64-${DATE}.iso" echo "${URL}/${ISO} ${HASH}" } @@ -2411,7 +2406,7 @@ function get_slackware() { local HASH="" local ISO="slackware64-${RELEASE}-install-dvd.iso" local URL="https://slackware.nl/slackware/slackware-iso/slackware64-${RELEASE}-iso" - HASH=$(web_pipe "${URL}/${ISO}.md5" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.md5" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2444,7 +2439,7 @@ function get_slitaz() { local HASH="" local ISO="slitaz-rolling-${RELEASE}" local URL="http://mirror.slitaz.org/iso/rolling" - HASH=$(web_pipe "${URL}/${ISO}.md5" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.md5" | cut -d' ' -f1) echo "${URL}/${ISO}.iso ${HASH}" } @@ -2452,7 +2447,7 @@ function get_solus() { local HASH="" local ISO="Solus-${RELEASE}-${EDITION}.iso" local URL="https://downloads.getsol.us/isos/${RELEASE}" - HASH=$(web_pipe "${URL}/${ISO}.sha256sum" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha256sum" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2466,7 +2461,7 @@ function get_sparkylinux() { minimalgui) URL="https://sourceforge.net/projects/sparkylinux/files/base";; *) URL="https://sourceforge.net/projects/sparkylinux/files/${EDITION}";; esac - HASH=$(web_pipe "${URL}/${ISO}.allsums.txt" | head -2 | grep 'iso' | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.allsums.txt" | head -2 | grep 'iso' | cut -d' ' -f1) echo "${URL}/${ISO}" "${HASH}" } @@ -2496,7 +2491,7 @@ function get_tinycore() { *Pure*) ARCH+="_64";; esac local URL="http://www.tinycorelinux.net/${RELEASE}.x/${ARCH}/release" - HASH=$(web_pipe "${URL}/${ISO}.md5.txt" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.md5.txt" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2510,7 +2505,7 @@ function get_trisquel() { kde) ISO="triskel_${RELEASE}_amd64.iso";; sugar) ISO="trisquel-sugar_${RELEASE}_amd64.iso";; esac - HASH=$(web_pipe "${URL}/${ISO}.sha1" | grep "${ISO}" | cut_1) + HASH=$(web_pipe "${URL}/${ISO}.sha1" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } @@ -2520,7 +2515,7 @@ function get_truenas-scale() { local URL="" local DLINFO="https://www.truenas.com/download-truenas-scale/" URL=$(web_pipe "${DLINFO}" | grep -o "\"https://.*${RELEASE}.*\.iso\"" | cut -d'"' -f 2) - HASH=$(web_pipe "${URL}.sha256" | cut_1) + HASH=$(web_pipe "${URL}.sha256" | cut -d' ' -f1) echo "${URL} ${HASH}" } @@ -2529,7 +2524,7 @@ function get_truenas-core() { local URL="" local DLINFO="https://www.truenas.com/download-truenas-core/" URL=$(web_pipe "${DLINFO}" | grep -o "\"https://.*${RELEASE}.*\.iso\"" | cut -d'"' -f 2) - HASH=$(web_pipe "${URL}".sha256 | cut_1) + HASH=$(web_pipe "${URL}".sha256 | cut -d' ' -f1) echo "${URL} ${HASH}" } @@ -2561,11 +2556,11 @@ function get_ubuntu-server() { if web_check "${URL}/SHA256SUMS"; then DATA=$(web_pipe "${URL}/SHA256SUMS" | grep "${NAME}" | grep amd64 | grep iso) ISO=$(cut -d'*' -f2 <<<"${DATA}") - HASH=$(cut_1 <<<"${DATA}") + HASH=$(cut -d' ' -f1 <<<"${DATA}") else DATA=$(web_pipe "${URL}/MD5SUMS" | grep "${NAME}" | grep amd64 | grep iso) ISO=$(cut -d' ' -f3 <<<"${DATA}") - HASH=$(cut_1 <<<"${DATA}") + HASH=$(cut -d' ' -f1 <<<"${DATA}") fi if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso" @@ -2607,11 +2602,11 @@ function get_ubuntu() { if web_check "${URL}/SHA256SUMS"; then DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac") ISO=$(cut -d'*' -f2 <<<"${DATA}" | sed '1q;d') - HASH=$(cut_1 <<<"${DATA}" | sed '1q;d') + HASH=$(cut -d' ' -f1 <<<"${DATA}" | sed '1q;d') else DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac") ISO=$(cut -d'*' -f2 <<<"${DATA}") - HASH=$(cut_1 <<<"${DATA}") + HASH=$(cut -d' ' -f1 <<<"${DATA}") fi if [ -z "${ISO}" ] || [ -z "${HASH}" ]; then echo "$(pretty_name "${OS}") ${RELEASE} is currently unavailable. Please select other OS/Release combination" @@ -2636,7 +2631,7 @@ function get_vanillaos() { local ISO="" ISO=$(web_pipe "https://api.github.com/repos/Vanilla-OS/live-iso/releases" | grep 'download_url' | grep "${RELEASE}" | head -1 | cut -d'"' -f4) HASH_URL="${ISO//.iso/.sha256.txt}" - HASH=$(web_pipe "${HASH_URL}" | cut_1) + HASH=$(web_pipe "${HASH_URL}" | cut -d' ' -f1) echo "${ISO} ${HASH}" } @@ -2659,7 +2654,7 @@ function get_vxlinux() { local HASH="" local ISO="vx-${RELEASE}.iso" local URL="https://github.com/VX-Linux/main/releases/download/${RELEASE}" - HASH=$(web_pipe "${URL}/vx-${RELEASE}.md5" | cut_1) + HASH=$(web_pipe "${URL}/vx-${RELEASE}.md5" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" }