2024-10-10 22:32:26 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Generate the configuration files for an experiment we're about to do
|
|
|
|
|
|
|
|
exp_num="$1"
|
|
|
|
secrecy="$2"
|
|
|
|
harshness="$3"
|
|
|
|
prob="$4"
|
2024-10-13 11:40:37 -04:00
|
|
|
uuid="$5"
|
2024-10-10 22:32:26 -04:00
|
|
|
|
2024-10-13 11:40:37 -04:00
|
|
|
mkdir -p "configs/${uuid}"
|
|
|
|
f1="configs/${uuid}/troll_patrol_config.json"
|
2024-10-10 22:32:26 -04:00
|
|
|
cp "${f1}.template" "${f1}"
|
2024-10-13 11:40:37 -04:00
|
|
|
f2="configs/${uuid}/simulation_config.json"
|
2024-10-10 22:32:26 -04:00
|
|
|
cp "${f2}.template" "${f2}"
|
|
|
|
|
|
|
|
# Troll Patrol config
|
|
|
|
sed -i "s/HARSHNESS/$harshness/" "${f1}"
|
|
|
|
|
|
|
|
# Lox Simulation config
|
|
|
|
sed -i "s/CENSOR_SECRECY/\"$secrecy\"/" "${f2}"
|
|
|
|
sed -i "s/PROB_USER_SUBMITS_REPORTS/$prob/" "${f2}"
|