From e67595a7c4fec052663a2d3172931c1ea5ea174c Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Wed, 27 Dec 2023 21:57:16 +0000 Subject: [PATCH] fix: make the download meter silent --- sync/sync.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sync/sync.sh b/sync/sync.sh index 4ada4b6..ff5a66d 100644 --- a/sync/sync.sh +++ b/sync/sync.sh @@ -4,14 +4,14 @@ Mirror-Clear(){ # existing remotes local id=$(tr -d '\n\t\r ' <<<"${1}" ) local token=$(tr -d '\n\t\r ' <<<"$TOKEN" ) - local response=$(curl -X "GET" "https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors" --header "PRIVATE-TOKEN: $token") + local response=$(curl -s -X "GET" "https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors" --header "PRIVATE-TOKEN: $token") # https://stackoverflow.com/a/67638584 readarray -t my_array < <(jq -c '.[]' <<< $response) # iterate through the Bash array for item in "${my_array[@]}"; do local id_mirror=$(jq --raw-output '.id' <<< "$item") - curl -X "DELETE" "https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors/$id_mirror" --header "PRIVATE-TOKEN: $token" + curl -s -X "DELETE" "https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors/$id_mirror" --header "PRIVATE-TOKEN: $token" done } @@ -27,7 +27,7 @@ Mirror-Create(){ local uri="https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors" echo $uri local tmp="" - curl -X "POST" "$uri" --header "PRIVATE-TOKEN: $token" --data $body + curl -s -X "POST" "$uri" --header "PRIVATE-TOKEN: $token" --data $body } Main() {