PowerShell/demos/rest/curlDemo.txt
2016-07-25 15:42:30 -07:00

20 lines
611 B
Plaintext

# EQ Linux
# get the json from the repo api and assign it to the txt file
# This grads the json file from the API
curl -u <insert GitHub PAT token> <insert GitHub repo URL> > outputtest.txt
# Reformats the json block to proper json (removes the newlines)
string=$(cat temp.txt)
# Replace the "private" value to false
find='"private": true'
replace='"private": false'
string2=${string/$find/$replace}
# push the json block into a txt file
echo $string2 > output.txt
# Post the updated JSON data to the repo
curl -u <insert GitHub PAT token> <insert GitHub repo URL> --data @output.txt