... | ... |
@@ -21,7 +21,7 @@ function parse_repo_history () { |
21 | 21 |
function github_curl () { |
22 | 22 |
test $# -eq 0 && return $(test -n "$githup_token") |
23 | 23 |
curl ${githup_token:+-u $githup_token} -si $1 > $gh_curl_content |
24 |
- eval $(sed -rn '1,/^\s*$/{s/^X-Ratelimit-Remaining:\s*([0-9]+).*$/remaining=\1/p;s/^X-Ratelimit-Reset:\s*([0-9]+).*$/reset=\1/p}' $gh_curl_content) |
|
24 |
+ eval $(sed -rn '1,/^\s*$/{s/^X-Ratelimit-Remaining:\s*([0-9]+).*$/remaining=\1/ip;s/^X-Ratelimit-Reset:\s*([0-9]+).*$/reset=\1/ip}' $gh_curl_content) |
|
25 | 25 |
if test ${remaining:-1} -eq 0; then |
26 | 26 |
((reset = reset + 10)) # just to be prudent |
27 | 27 |
echo "github API limit: waiting $(date +%H:%M -d@$reset) to continue" >&2 |