Skip to content

Commit

Permalink
Parallelize list_csv
Browse files Browse the repository at this point in the history
  • Loading branch information
lj3954 committed Apr 20, 2024
1 parent 8a198b0 commit 3509b1c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,15 @@ function list_json() {
}

function list_csv() {
CSV_DATA="$(csv_data)"

echo "Display Name,OS,Release,Option,Downloader,PNG,SVG"
sort -f <<<"${CSV_DATA}"

exit 0
}

function csv_data() {
local DISPLAY_NAME
local DL=""
local DOWNLOADER
Expand All @@ -379,7 +388,6 @@ function list_csv() {
HAS_ZSYNC=1
fi

echo "Display Name,OS,Release,Option,Downloader,PNG,SVG"
for OS in $(os_support); do
DISPLAY_NAME="$(pretty_name "${OS}")"

Expand Down Expand Up @@ -412,9 +420,9 @@ function list_csv() {
else
echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
fi
done
done &
done
exit 0
wait
}

list_supported() {
Expand Down

0 comments on commit 3509b1c

Please sign in to comment.