Skip to content

Commit

Permalink
Added backup script
Browse files Browse the repository at this point in the history
  • Loading branch information
kdimentionaltree committed Aug 24, 2024
1 parent 50a50ac commit 111dff3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/update_init_block.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function usage() {
exit
}


while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
Expand Down Expand Up @@ -52,6 +51,8 @@ FILEHASH=$(echo "$RES" | jq '.file_hash')
ROOTHASH=$(echo "$RES" | jq '.root_hash')

FILENAME=$1

cp $FILENAME $FILENAME.bk || echo "Failed to backup the config"
python3 <<EOF
import json
with open("$FILENAME", 'r') as f:
Expand Down

0 comments on commit 111dff3

Please sign in to comment.