Skip to content

Commit 111dff3

Browse files
Added backup script
1 parent 50a50ac commit 111dff3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/update_init_block.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ function usage() {
1111
exit
1212
}
1313

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

5453
FILENAME=$1
54+
55+
cp $FILENAME $FILENAME.bk || echo "Failed to backup the config"
5556
python3 <<EOF
5657
import json
5758
with open("$FILENAME", 'r') as f:

0 commit comments

Comments
 (0)