Skip to content

Commit

Permalink
Only extract when download
Browse files Browse the repository at this point in the history
  • Loading branch information
alpeto9 committed Oct 17, 2024
1 parent a24ba3f commit f9db1e2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions downloadLedgerSnapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ if [ -z "$(ls -A "$DATA_DIR")" ]; then
echo "Snapshot download or execution failed."
exit 1
fi
tar --use-compress-program=zstdmt -xvf RADIXDB-INDEX.tar.zst --exclude=./address_book -C .
rm -rf RADIXDB-INDEX.*
rm -rf latest-snapshot-INDEX.sh*
echo "Snapshot restored"
else
echo "Directory $DATA_DIR is not empty. Downloading Ledger Snapshot aborted:"
ls -l "$DATA_DIR"
fi

tar --use-compress-program=zstdmt -xvf RADIXDB-INDEX.tar.zst --exclude=./address_book -C .
rm -rf RADIXDB-INDEX.*
rm -rf latest-snapshot-INDEX.sh*
echo "Snapshot restored"


0 comments on commit f9db1e2

Please sign in to comment.