On 28-Oct-15 6:20 AM, Michel Morin wrote:
Beman Dawes wrote:
Is it possible to write a curl script that could make the change for all libraries?
Like this
REPOLIST=$(curl https://raw.githubusercontent.com/boostorg/boost/master/.gitmodules \ | awk -F '"' '{print $2}') for REPO in $REPOLIST; do curl --user $USERNAME:$PASSWORD \ --data '{"name": $REPO, "default_branch":"develop"}' \ https://api.github.com/repos/boostorg/$REPO done
? (You need to set USERNAME and PASSWORD in some way before using the command.)
I have ran the above, with some quoting fixes: REPOLIST=$(curl https://raw.githubusercontent.com/boostorg/boost/master/.gitmodules | awk -F '"' '{print $2}') for REPO in $REPOLIST; do curl -H "Authorization: token <redacted>" --data "{\"name\": \"$REPO\", \"default_branch\": \"develop\"}" https://api.github.com/repos/boostorg/$REPO; done This has updated every repo that is included in master. I've updated hana by hand. Is this fine with everybody? -- Vladimir Prus http://vladimirprus.com