2020-10-06 15:17:34 +00:00
|
|
|
#!/usr/bin/env nix-shell
|
2022-09-09 01:25:31 +00:00
|
|
|
#! nix-shell -i bash -p jq
|
2020-10-06 15:17:34 +00:00
|
|
|
# shellcheck shell=bash
|
|
|
|
|
|
|
|
# Update all providers which have specified provider source address
|
|
|
|
set -euo pipefail
|
|
|
|
|
2022-03-13 02:21:21 +00:00
|
|
|
readarray -t providers < <(
|
2020-10-06 15:17:34 +00:00
|
|
|
jq -r 'to_entries
|
|
|
|
| map_values(.value + { alias: .key })
|
|
|
|
| .[]
|
2022-11-26 08:42:21 +00:00
|
|
|
| select(."homepage"?)
|
2020-10-06 15:17:34 +00:00
|
|
|
| .alias' providers.json
|
|
|
|
)
|
|
|
|
|
2022-03-13 02:21:21 +00:00
|
|
|
cat <<EOF
|
|
|
|
Will update ${#providers[@]} providers:
|
2020-10-06 15:17:34 +00:00
|
|
|
|
2022-03-13 02:21:21 +00:00
|
|
|
${providers[*]}
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
for provider in "${providers[@]}"; do
|
2022-11-26 22:36:57 +00:00
|
|
|
./update-provider --no-spdx "$@" "${provider}"
|
2020-10-06 15:17:34 +00:00
|
|
|
done
|