add era dir to make_states

This commit is contained in:
Jacek Sieka 2024-08-12 14:49:32 +02:00
parent 19451cadff
commit 8723a79225
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
1 changed files with 5 additions and 4 deletions

View File

@ -6,9 +6,9 @@ set -e
trap "exit" INT
if [ -z "$3" ]
if [ -z "$4" ]
then
echo "Syntax: make_states.sh datadir era1dir statsdir [startdir]"
echo "Syntax: make_states.sh datadir era1dir eradir statsdir [startdir]"
exit 1;
fi
@ -20,15 +20,16 @@ REV=$(git rev-parse --short=8 HEAD)
DATA_DIR="$1/${DATE}-${REV}"
mkdir -p "$DATA_DIR"
[ "$4" ] && cp -ar "$4"/* "$DATA_DIR"
[ "$5" ] && cp -ar "$5"/* "$DATA_DIR"
while true;
do
"$SCRIPT_DIR/../build/nimbus" import \
--data-dir:"${DATA_DIR}" \
--era1-dir:"$2" \
--era-dir:"$3" \
--debug-csv-stats:"$3/stats-${DATE}-${REV}.csv" \
--max-blocks:100000
--max-blocks:1000000
cp -ar "$1/${DATE}-${REV}" "$1/${DATE}-${REV}"-$(printf "%04d" $counter)
counter=$((counter+1))
done