Skip to content

Commit 17b4292

Browse files
committed
leiosdemo202510: polishing the leios-october-script.sh
1 parent 49026a6 commit 17b4292

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

scripts/leios-demo/leios-october-demo.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
now=$(date +%s)
4-
53
if [[ ! "$SECONDS_UNTIL_REF_SLOT" =~ ^[0-9]*$ ]] || [[ "$SECONDS_UNTIL_REF_SLOT" -le 0 ]]; then
64
echo "Error: \${SECONDS_UNTIL_REF_SLOT} must be a positive integer of seconds, which will be added to the execution time of this script." >&2
75
exit 1
@@ -38,6 +36,13 @@ if [[ -z "${REF_SLOT}" ]] || [[ ! "$REF_SLOT" =~ ^[0-9]*$ ]] || [[ "$REF_SLOT" -
3836
exit 1
3937
fi
4038

39+
now=$(date +%s)
40+
ONSET_OF_REF_SLOT=$(( $now + ${SECONDS_UNTIL_REF_SLOT} ))
41+
echo "REF_SLOT=$REF_SLOT"
42+
echo "ONSET_OF_REF_SLOT=$ONSET_OF_REF_SLOT"
43+
echo "$REF_SLOT" >ref_slot
44+
echo "$ONSET_OF_REF_SLOT" >onset_of_ref_slot
45+
4146
# arbitrary choices
4247

4348
PORT1=3001
@@ -152,12 +157,6 @@ popd > /dev/null
152157
## Run immdb-server
153158
##
154159

155-
ONSET_OF_REF_SLOT=$(( $now + ${SECONDS_UNTIL_REF_SLOT} ))
156-
echo "REF_SLOT=$REF_SLOT"
157-
echo "ONSET_OF_REF_SLOT=$ONSET_OF_REF_SLOT"
158-
echo "$REF_SLOT" >ref_slot
159-
echo "$ONSET_OF_REF_SLOT" >onset_of_ref_slot
160-
161160
IMMDB_CMD_CORE="${IMMDB_SERVER} \
162161
--db $CLUSTER_RUN_DATA/immdb-node/immutable/ \
163162
--config $CLUSTER_RUN_DATA/immdb-node/config.json \

0 commit comments

Comments
 (0)