From 58b3daece1dbc6e50273e76ead1c627e1cb7e2af Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Sun, 20 Aug 2023 14:31:10 +0100 Subject: [PATCH] name --- internal/extra_push.sh | 2 +- internal/package_extra.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/internal/extra_push.sh b/internal/extra_push.sh index e603c6c5..3226785d 100755 --- a/internal/extra_push.sh +++ b/internal/extra_push.sh @@ -15,7 +15,7 @@ for NAME in $(cat $EXTRA_JSON | jq -r '.[] | .name'); do local SPARSE=$(cat $EXTRA_JSON | jq -r ".[] | select(.name == \"$NAME\") | .sparse") if [ "$SPARSE" == "true" ]; then - upload_file "$NAME-$HASH_RAW-optimized.img.gz" + upload_file "$NAME-$HASH_RAW-skip-chunks.img.gz" else upload_file "$NAME-$HASH_RAW.img.gz" fi diff --git a/internal/package_extra.sh b/internal/package_extra.sh index c59b3423..8f2954fc 100755 --- a/internal/package_extra.sh +++ b/internal/package_extra.sh @@ -47,13 +47,13 @@ process_file() { fi if [ $SPARSE == "true" ]; then - local OPTIMIZED_IMAGE_FILE=${IMAGE_FILE%.img}-optimized.img - if [ ! -f $OPTIMIZED_IMAGE_FILE ]; then + local SKIP_CHUNKS_IMAGE_FILE=${IMAGE_FILE%.img}-skip-chunks.img + if [ ! -f $SKIP_CHUNKS_IMAGE_FILE ]; then echo " optimizing..." - $TOOLS_DIR/simg2dontcare.py $IMAGE_FILE $OPTIMIZED_IMAGE_FILE + $TOOLS_DIR/simg2dontcare.py $IMAGE_FILE $SKIP_CHUNKS_IMAGE_FILE fi - IMAGE_FILE=$OPTIMIZED_IMAGE_FILE - FILE_NAME=${FILE_NAME%.img}-optimized.img + IMAGE_FILE=$SKIP_CHUNKS_IMAGE_FILE + FILE_NAME=${FILE_NAME%.img}-skip-chunks.img HASH=$(sha256sum $IMAGE_FILE | cut -c 1-64) fi @@ -69,7 +69,9 @@ process_file() { { "name": "$NAME", "hash": "$HASH", + "hash_raw": "$HASH_RAW", "size": $SIZE, + "sparse": $SPARSE, EOF cat <> $EXTRA_JSON