diff --git a/dockerhub_doc_config_update.sh b/dockerhub_doc_config_update.sh index 418771340..5de74877e 100755 --- a/dockerhub_doc_config_update.sh +++ b/dockerhub_doc_config_update.sh @@ -131,12 +131,14 @@ function generate_official_image_arches() { arches="windows-amd64" else # shellcheck disable=SC2046,SC2005,SC1003,SC2086,SC2063 - arches=$(echo $(grep ') \\' ${file} | grep -v "*" | sed 's/) \\//g; s/|//g' | sort) | sed 's/ /, /g') + arches=$(echo $(grep ') \\' ${file} | grep -v "*" | sed 's/) \\//g; s/|//g')) arches=$(echo ${arches} | sed 's/x86_64/amd64/g') # replace x86_64 with amd64 arches=$(echo ${arches} | sed 's/ppc64el/ppc64le/g') # replace ppc64el with ppc64le arches=$(echo ${arches} | sed 's/arm64/arm64v8/g') # replace arm64 with arm64v8 arches=$(echo ${arches} | sed 's/aarch64/arm64v8/g') # replace aarch64 with arm64v8 arches=$(echo ${arches} | sed 's/armhf/arm32v7/g') # replace armhf with arm32v7 + # sort arches alphabetically + arches=$(echo ${arches} | tr ' ' '\n' | sort | tr '\n' ' ' | sed 's/ /, /g' | sed 's/, $//') fi }