mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-10-02 11:21:07 +00:00
3296454e01
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
9 lines
484 B
Bash
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
|