stack_wallet/assets/svg/coin_icons/coins.sh
sneurlax 3296454e01 add non-stack coin images and reference download script
I already did the work, might as well commit it in case we want to support non-Stack coins.  We'll make commission from sales even if we don't support them
2023-01-26 17:35:04 -06:00

9 lines
484 B
Bash

# read each item in the JSON array to an item in the Bash array
readarray -t my_array < <(jq -c '.[]' coins.json)
# iterate through the Bash array
for item in "${my_array[@]}"; do
echo
echo "Downloading $(jq '.name' <<< "$item" | xargs echo) logo from $(echo $(jq '.image' <<< "$item") | xargs echo) and saving as $(jq '.name' <<< "$item" | xargs echo).svg"
curl $(echo $(jq '.image' <<< "$item") | xargs echo) --output "$(jq '.name' <<< "$item" | xargs echo).svg"
done