From 8e6a198ade90bc43a9eb55b1124889e9a038c9f0 Mon Sep 17 00:00:00 2001 From: dongsam Date: Thu, 21 Oct 2021 12:41:22 +0900 Subject: [PATCH] docs: add os checking for sed -i option * commit '305f2fb7da43f1050dd6aa591b43bbdadefa63bd': (23 commits) chore: bump Cosmos SDK version to 0.44.2 fix: emit `rewards_withdrawn` event (#166) chore: fix linter issue feat: refactor validating EpochAmount, EpochRatio feat: refactory ValidateStakingCoinTotalWeights fix: apply suggestions from review fix: terminate plan when deleting public plan proposal (#162) fix: change the logic to determine what the request is for chore: fix typo and use nil EpochRatio instead of zero chore: change error message test: update proposal handler tests fix: allow optional fields in UpdateRequestProposal fix: more strict validation and allow optional addrs fix: EpochAmount/EpochRatio fields can be both empty fix: allow empty plan name in UpdateRequestProposal fix!: forbid empty plan name and allow empty weights test: change expected error messages test: add tests for proposal validation test: add TestValidateStakingCoinTotalWeights fix: fix proposal validation logic ... --- docs/Tutorials/demo/budget_with_farming.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/Tutorials/demo/budget_with_farming.md b/docs/Tutorials/demo/budget_with_farming.md index 154e226e..3eb2f977 100644 --- a/docs/Tutorials/demo/budget_with_farming.md +++ b/docs/Tutorials/demo/budget_with_farming.md @@ -78,18 +78,25 @@ $BINARY add-genesis-account $($BINARY keys show user2 --keyring-backend test -a) $BINARY gentx val1 50000000000000000stake --chain-id $CHAIN_ID --keyring-backend test $BINARY collect-gentxs +# Check OS for sed -i option value +export SED_I="" +if [[ "$OSTYPE" == "darwin"* ]]; then + export SED_I="''" +fi +aa + # Modify app.toml -sed -i '' 's/enable = false/enable = true/g' $HOME_FARMINGAPP/config/app.toml -sed -i '' 's/swagger = false/swagger = true/g' $HOME_FARMINGAPP/config/app.toml +sed -i $SED_I 's/enable = false/enable = true/g' $HOME_FARMINGAPP/config/app.toml +sed -i $SED_I 's/swagger = false/swagger = true/g' $HOME_FARMINGAPP/config/app.toml # Modify parameters for the governance proposal -sed -i '' 's%"amount": "10000000"%"amount": "1"%g' $HOME_FARMINGAPP/config/genesis.json -sed -i '' 's%"quorum": "0.334000000000000000",%"quorum": "0.000000000000000001",%g' $HOME_FARMINGAPP/config/genesis.json -sed -i '' 's%"threshold": "0.500000000000000000",%"threshold": "0.000000000000000001",%g' $HOME_FARMINGAPP/config/genesis.json -sed -i '' 's%"voting_period": "172800s"%"voting_period": "30s"%g' $HOME_FARMINGAPP/config/genesis.json +sed -i $SED_I 's%"amount": "10000000"%"amount": "1"%g' $HOME_FARMINGAPP/config/genesis.json +sed -i $SED_I 's%"quorum": "0.334000000000000000",%"quorum": "0.000000000000000001",%g' $HOME_FARMINGAPP/config/genesis.json +sed -i $SED_I 's%"threshold": "0.500000000000000000",%"threshold": "0.000000000000000001",%g' $HOME_FARMINGAPP/config/genesis.json +sed -i $SED_I 's%"voting_period": "172800s"%"voting_period": "30s"%g' $HOME_FARMINGAPP/config/genesis.json # Modify inflation rate from 13% to 33% -sed -i '' 's%"inflation": "0.130000000000000000",%"inflation": "0.330000000000000000",%g' $HOME_FARMINGAPP/config/genesis.json +sed -i $SED_I 's%"inflation": "0.130000000000000000",%"inflation": "0.330000000000000000",%g' $HOME_FARMINGAPP/config/genesis.json # Start $BINARY start