jimmydot | 8b8addd | 2017-05-08 18:00:46 -0400 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | FINAL_CONFIG_FILE=/tmp/vid/stage/WEB-INF/classes/logback.xml |
| 4 | TEMPLATE_CONFIG_FILE=/tmp/vid/stage/WEB-INF/classes/logback_template.xml |
| 5 | |
| 6 | echo "Localizing the VID logback configuration" |
| 7 | |
| 8 | mkdir -p "${VID_LOG_DIR}" |
| 9 | |
| 10 | sed -e 's/${VID_LOG_LEVEL}/'${VID_LOG_LEVEL}'/g' \ |
| 11 | -e 's,${VID_LOG_DIR},'${VID_LOG_DIR}',g' ${TEMPLATE_CONFIG_FILE} > ${FINAL_CONFIG_FILE} || { |
| 12 | echo "ERROR: Could not process template file ${TEMPLATE_CONFIG_FILE} into ${FINAL_CONFIG_FILE}" |
| 13 | exit 3 |
| 14 | } |
| 15 | |
| 16 | echo "Localized ${FINAL_CONFIG_FILE} successfully." |