Skip to content

Commit

Permalink
Add a check to backup only if file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Sep 14, 2020
1 parent 1a707ed commit 669e2bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/cnode-helper-scripts/prereqs.sh
Expand Up @@ -227,7 +227,7 @@ if [[ "$GUILD" = "Y" ]]; then
else
curl -sL -o byron-genesis.json ${OVERWRITE} https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/mainnet-byron-genesis.json
curl -sL -o genesis.json ${OVERWRITE} https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/mainnet-shelley-genesis.json
cp topology.json "topology.json_bkp$(date +%s)"
[[ -f topology.json ]] && cp topology.json "topology.json_bkp$(date +%s)"
curl -sL -o topology.json ${OVERWRITE} https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/mainnet-topology.json
fi

Expand All @@ -252,7 +252,7 @@ curl -s -o cntools.config https://raw.githubusercontent.com/cardano-community/gu
curl -s -o cntools.library https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/cntools.library
curl -s -o cntoolsBlockCollector.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/cntoolsBlockCollector.sh
curl -s -o setup_mon.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/setup_mon.sh
cp topologyUpdater.sh "topologyUpdater.sh_bkp$(date +%s)"
[[ -f topologyUpdater.sh ]] && cp topologyUpdater.sh "topologyUpdater.sh_bkp$(date +%s)"
curl -s -o topologyUpdater.sh ${OVERWRITE} https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/topologyUpdater.sh
curl -s -o itnRewards.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/itnRewards.sh
curl -s -o cabal-build-all.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/cabal-build-all.sh
Expand Down

0 comments on commit 669e2bc

Please sign in to comment.