Sort repositories

Signed-off-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
Bitnami Containers
2022-04-12 15:42:57 +02:00
parent 4c1d6a05d6
commit 1d7bc3ee12

View File

@@ -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"