1
0
mirror of https://github.com/captainark/github2email.git synced 2024-11-22 16:41:42 +01:00

small fixes

This commit is contained in:
CaptainArk 2018-04-19 23:13:45 +02:00
parent 4a2f3a48ba
commit 7c343cd6b8

View File

@ -11,10 +11,10 @@ fi
GitHubApi="https://api.github.com/users/${UserName}/starred" GitHubApi="https://api.github.com/users/${UserName}/starred"
LastPage="$(curl -I ${GitHubApi} | grep -Eo 'page=[[:digit:]]+' | tail -n1)" LastPage="$(curl -I ${GitHubApi} | grep -Eo 'page=[[:digit:]]+' | tail -n1)"
TempFile=$(mktemp -t $0) TempFile=$(mktemp -t github2email.sh.XXXXXXXXXX)
for StarPages in $(seq 1 ${LastPage#*=}); do for StarPages in $(seq 1 ${LastPage#*=}); do
curl -s "${GitHubApi}&page=${StarPages}" | jq -r '.[] | .name + "," + .html_url' | sed 's#$#/releases.atom#' >> ${TempFile} curl -s "${GitHubApi}?page=${StarPages}" | jq -r '.[] | .name + "," + .html_url' | sed 's#$#/releases.atom#' >> ${TempFile}
done done
# Checking for API request success # Checking for API request success