Disable curl progress bar but show stderr messages

This commit is contained in:
Juergen Hoetzel 2020-06-21 13:07:12 +02:00
parent 00876ea5f2
commit 5bea23d0ff

View file

@ -3,7 +3,7 @@
set -euo pipefail set -euo pipefail
# Mirror starred Github repos to a Gitea Organization # Mirror starred Github repos to a Gitea Organization
CURL="curl -f" CURL="curl -f -S -s"
if [[ -z "${ACCESS_TOKEN}" || -z "${GITEA_URL}" ]];then if [[ -z "${ACCESS_TOKEN}" || -z "${GITEA_URL}" ]];then
echo -e "Please set gitea access token and url in environment:\nexport ACCESS_TOKEN=abc\nexport GITEA_URL=http://gitea:3000\n" >&2 echo -e "Please set gitea access token and url in environment:\nexport ACCESS_TOKEN=abc\nexport GITEA_URL=http://gitea:3000\n" >&2
@ -23,7 +23,7 @@ header_options=(-H "Authorization: Bearer ${ACCESS_TOKEN}" -H "accept: applicat
jsonoutput=$(mktemp -d -t github-repos-XXXXXXXX) jsonoutput=$(mktemp -d -t github-repos-XXXXXXXX)
trap "rm -rvf ${jsonoutput}" EXIT trap "rm -rvf ${jsonoutput}" EXIT
uid=$($CURL -s "${header_options[@]}" $GITEA_URL/api/v1/orgs/${gitea_organization} |jq .id) uid=$($CURL "${header_options[@]}" $GITEA_URL/api/v1/orgs/${gitea_organization} |jq .id)
fetch_starred_repos(){ fetch_starred_repos(){
i=1 i=1