From f9a4ee8a7ba95bbff4ef8cd19e5988460ab25100 Mon Sep 17 00:00:00 2001 From: termux-pacman-bot Date: Sat, 18 Jun 2022 13:27:47 +0000 Subject: [PATCH] Update repo --- scripts/aptly_api.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/aptly_api.sh b/scripts/aptly_api.sh index b35f4936e8..04c1efc8a9 100644 --- a/scripts/aptly_api.sh +++ b/scripts/aptly_api.sh @@ -11,6 +11,9 @@ CURL_COMMON_OPTIONS=( --write-out "|%{http_code}" --resolve "packages.termux.dev:443:216.18.208.170" ) + +CURL_ADDITIONAL_OPTIONS=() + # Function for deleting temporary directory with uploaded files from # the server. aptly_delete_dir() { @@ -18,7 +21,7 @@ aptly_delete_dir() { curl_response=$( curl \ - "${CURL_COMMON_OPTIONS[@]}" \ + "${CURL_COMMON_OPTIONS[@]}" "${CURL_ADDITIONAL_OPTIONS[@]}" \ --request DELETE \ ${REPOSITORY_URL}/files/${REPOSITORY_NAME}-${GITHUB_SHA} ) @@ -33,7 +36,7 @@ aptly_delete_dir() { aptly_upload_file() { local filename="$1" curl_response=$(curl \ - "${CURL_COMMON_OPTIONS[@]}" \ + "${CURL_COMMON_OPTIONS[@]}" "${CURL_ADDITIONAL_OPTIONS[@]}" \ --request POST \ --form file=@${filename} \ ${REPOSITORY_URL}/files/${REPOSITORY_NAME}-${GITHUB_SHA} || true @@ -62,7 +65,7 @@ aptly_add_to_repo() { echo "[$(date +%H:%M:%S)] Adding packages to repository '$REPOSITORY_NAME'..." curl_response=$( curl \ - "${CURL_COMMON_OPTIONS[@]}" \ + "${CURL_COMMON_OPTIONS[@]}" "${CURL_ADDITIONAL_OPTIONS[@]}" \ --max-time 300 \ --request POST \ ${REPOSITORY_URL}/repos/${REPOSITORY_NAME}/file/${REPOSITORY_NAME}-${GITHUB_SHA} || true @@ -95,7 +98,7 @@ aptly_publish_repo() { echo "[$(date +%H:%M:%S)] Publishing repository changes..." curl_response=$( curl \ - "${CURL_COMMON_OPTIONS[@]}" \ + "${CURL_COMMON_OPTIONS[@]}" "${CURL_ADDITIONAL_OPTIONS[@]}" \ --max-time 300 \ --header 'Content-Type: application/json' \ --request PUT \