Add explanatory comments
This commit is contained in:
parent
0bbce517e3
commit
7e3e793575
@ -30,7 +30,10 @@ if [ ! -d "$geth_dir" ] && [ "${CERC_USE_SNAPSHOT}" = "true" ] && [ -n "$snapsho
|
||||
|
||||
case $snapshot_file in
|
||||
*.lz4)
|
||||
# Determine where geth dir is located
|
||||
archive_geth_path=$(lz4 -c -d $snapshot_file | tar -tf - | grep -m1 -E 'geth/?$')
|
||||
|
||||
# Determine strip-components count from the path
|
||||
to_strip=$(($(echo "$archive_geth_path" | grep -o '/' | wc -l) - 1))
|
||||
|
||||
lz4 -c -d $snapshot_file | tar -C ${DATA_DIR}/ -xvf - --strip-components=$to_strip $archive_geth_path
|
||||
|
Loading…
Reference in New Issue
Block a user