nodeup: Simplify the template by removing split-commas

This commit is contained in:
Ciprian Hacman 2025-08-24 17:05:42 +03:00
parent 633a9b757b
commit 4e008ffe7a
1 changed files with 1 additions and 5 deletions

View File

@ -74,7 +74,7 @@ download-or-bust() {
local -r file="$1"
local -r hash="$2"
local -a urls
mapfile -t urls < <(split-commas "$3")
IFS=, read -r -a urls <<< "$3"
if [[ -f "${file}" ]]; then
if ! validate-hash "${file}" "${hash}"; then
@ -125,10 +125,6 @@ validate-hash() {
fi
}
function split-commas() {
echo "$1" | tr "," "\n"
}
function download-release() {
case "$(uname -m)" in
x86_64*|i?86_64*|amd64*)