gen-configs.sh 456 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Generate the configuration files for an experiment we're about to do
  3. exp_num="$1"
  4. secrecy="$2"
  5. harshness="$3"
  6. prob="$4"
  7. f1="configs/troll_patrol_config.json"
  8. cp "${f1}.template" "${f1}"
  9. f2="configs/simulation_config.json"
  10. cp "${f2}.template" "${f2}"
  11. # Troll Patrol config
  12. sed -i "s/HARSHNESS/$harshness/" "${f1}"
  13. # Lox Simulation config
  14. sed -i "s/CENSOR_SECRECY/\"$secrecy\"/" "${f2}"
  15. sed -i "s/PROB_USER_SUBMITS_REPORTS/$prob/" "${f2}"