From 1d7bc3ee1213ac07579a22bf2cbf326312efcbfd Mon Sep 17 00:00:00 2001 From: Bitnami Containers Date: Tue, 12 Apr 2022 15:42:57 +0200 Subject: [PATCH] Sort repositories Signed-off-by: Bitnami Containers --- scripts/fetch-commits.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fetch-commits.sh b/scripts/fetch-commits.sh index 8e291c63b607..c34cf74cf4ae 100755 --- a/scripts/fetch-commits.sh +++ b/scripts/fetch-commits.sh @@ -92,12 +92,12 @@ function syncRepos() { # Build array of app names since we need to exclude them when moving files local apps=("mock") - local -r urls=($(echo "$repos" | jq -r '.[].html_url')) + local -r urls=($(echo "$repos" | jq -r '.[].html_url' | sort | uniq)) for repo_url in "${urls[@]}"; do name="${repo_url:42}" # 42 is the length of https://github.com/bitnami/bitnami-docker- apps=("${apps[@]}" "$name") done - echo "$repos" | jq -r '.[].html_url' | while read -r repo_url; do + echo "$repos" | jq -r '.[].html_url' | sort | uniq | while read -r repo_url; do name="${repo_url:42}" # 42 is the length of https://github.com/bitnami/bitnami-docker- ( cd "$TARGET_DIR"