From 1c58edd0db349b3fd61dae0af7ff2b16534151ca Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 6 Dec 2022 20:26:31 +0100 Subject: [PATCH] Update daily_README.yaml --- .github/workflows/daily_README.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/daily_README.yaml b/.github/workflows/daily_README.yaml index 91583261e..3a8f6a075 100644 --- a/.github/workflows/daily_README.yaml +++ b/.github/workflows/daily_README.yaml @@ -55,19 +55,19 @@ jobs: SLUG="$(jq -r '.image' "$f/config.json" | awk -F 'alexbelgium/|-{arch' '{print $2}')" if [[ "$(jq '.arch[]' "$f/config.json")" == *"armv7"* ]]; then ARCH=armv7 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" - if [ -z "$COUNT" ]; then echo "$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}')"; fi + until [ -n "$COUNT" ]; do COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" && sleep 5; done COUNT1="$COUNT" echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))" else COUNT1="-"; fi if [[ "$(jq '.arch[]' "$f/config.json")" == *"amd64"* ]]; then ARCH=amd64 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" - until [ ! -z "$COUNT" ]; do COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" && sleep 5; done + until [ -n "$COUNT" ]; do COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" && sleep 5; done COUNT2="$COUNT" echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))" else COUNT2="-"; fi if [[ "$(jq '.arch[]' "$f/config.json")" == *"aarch64"* ]]; then ARCH=aarch64 && COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" - if [ -z "$COUNT" ]; then echo "$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}')"; fi + until [ -n "$COUNT" ]; do COUNT="$(curl -f -s -L https://github.com/alexbelgium/hassio-addons/pkgs/container/$SLUG-$ARCH/latest | awk '/Total downloads/{getline; print}' | awk -F '<|>' '{print $3}')" && sleep 5; done COUNT3="$COUNT" echo "$COUNT $ARCH users with $SLUG" && DOWNLOADS="$(( DOWNLOADS + COUNT))" else COUNT3="-";fi @@ -79,10 +79,10 @@ jobs: sort -k2,2 -r -n Stats > tmp && mv tmp Stats sed -i "1i Name Total armv7 amd64 aarch64" Stats - TOTAL="$(awk '{SUM+=$2}END{print SUM}' Stats)" - TOTAL1="$(awk '{SUM+=$2}END{print SUM}' Stats)" - TOTAL2="$(awk '{SUM+=$2}END{print SUM}' Stats)" - TOTAL3="$(awk '{SUM+=$2}END{print SUM}' Stats)" + #TOTAL="$(awk '{SUM+=$2}END{print SUM}' Stats)" + #TOTAL1="$(awk '{SUM+=$2}END{print SUM}' Stats)" + #TOTAL2="$(awk '{SUM+=$2}END{print SUM}' Stats)" + #TOTAL3="$(awk '{SUM+=$2}END{print SUM}' Stats)" # Make plot