From c8afdd46f1d28e999aa18c6ce31478ff72463074 Mon Sep 17 00:00:00 2001 From: sudo-shashank Date: Wed, 27 Mar 2024 19:14:49 +0530 Subject: [PATCH] lint fix --- .../archival-snapshots/resources/diff_script.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible/archival-snapshots/resources/diff_script.sh b/ansible/archival-snapshots/resources/diff_script.sh index 54b034444..478a6994e 100755 --- a/ansible/archival-snapshots/resources/diff_script.sh +++ b/ansible/archival-snapshots/resources/diff_script.sh @@ -11,14 +11,14 @@ DIFF_COUNT=10 GENESIS_TIMESTAMP=1598306400 SECONDS_PER_EPOCH=30 -for i in `seq 1 $DIFF_COUNT`; do +for i in $(seq 1 $DIFF_COUNT); do EPOCH=$((EPOCH_START+DIFF_STEP*i)) - EPOCH_TIMESTAMP=$((1598306400 + EPOCH*SECONDS_PER_EPOCH)) - DATE=$(date --date=@$EPOCH_TIMESTAMP -u -I) - FILE=diff_snapshots/forest_diff_mainnet_"$DATE"_height_$((EPOCH-DIFF_STEP))+"$DIFF_STEP".forest.car.zst - if ! test -f $FILE; then - "$FOREST" archive export --depth $DIFF_STEP --epoch $EPOCH --diff $((EPOCH-DIFF_STEP)) --diff-depth 900 --output-path $FILE $@ + EPOCH_TIMESTAMP=$((GENESIS_TIMESTAMP + EPOCH*SECONDS_PER_EPOCH)) + DATE=$(date --date=@"$EPOCH_TIMESTAMP" -u -I) + FILE="diff_snapshots/forest_diff_mainnet_${DATE}_height_$((EPOCH-DIFF_STEP))+$DIFF_STEP.forest.car.zst" + if ! test -f "$FILE"; then + "$FOREST" archive export --depth "$DIFF_STEP" --epoch "$EPOCH" --diff $((EPOCH-DIFF_STEP)) --diff-depth 900 --output-path "$FILE" "$@" else - echo Skipping $FILE + echo "Skipping $FILE" fi done