Skip to content

Commit

Permalink
Add create-local-appsettings.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Atralupus committed Aug 12, 2023
1 parent 1cd0e74 commit b7f3e72
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions backend/app/scripts/create-local-appsettings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

project_path=$(pwd)

genesis_block_path="file://$project_path/data/genesis.bin"
store_uri="rocksdb+file://$project_path/data/store?secure=false"

local_json_file="$project_path/Savor22b/appsettings.local.json"
json_file="$project_path/Savor22b/appsettings.json"

if [ ! -f $local_json_file ]; then
cp $json_file $local_json_file
fi

jq ".GenesisBlockPath = \"$genesis_block_path\" | .StoreUri = \"$store_uri\"" $local_json_file >temp.json && mv temp.json $local_json_file

0 comments on commit b7f3e72

Please sign in to comment.