-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·20 lines (16 loc) · 832 Bytes
/
run.sh
File metadata and controls
executable file
·20 lines (16 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
# Get experiments.json
# curl --connect-timeout 10 -s --compressed 'https://www.twitch.tv/experiments.json' | jq -M --tab . > experiments.json
# if [ -s experiments.json ]; then
# git add experiments.json && git commit -m 'Update experiments.json'
# fi
# Get site_options.js
# curl --connect-timeout 10 -s --compressed 'https://www.twitch.tv/site_options.js' | tail -c +22 | head -c -2 | jq -M --tab . > site_options.js
# git add site_options.js && git commit -m 'Update site_options.js'
# Get config
curl --connect-timeout 10 -s --compressed "https://assets.twitch.tv/eppo/api/flag-config/v1/config?sdkName=js-sdk-client&sdkVersion=3.1.2&apiKey=$api_key" | jq -M --tab 'del(.createdAt)' > config.json
if [ -s config.json ]; then
git add config.json && git commit -m 'Update config.json'
fi
# Push to repo
git push