kolla/tools/validate-min-env-vars.sh
Martin André 97e8dc5e20 Add validation script for min env vars documentation
Change-Id: I46ffa01d0097916055857c3f968e716e0229795f
Partially-implements: blueprint add-min-env-vars-gate
2015-07-05 08:36:21 +09:00

18 lines
378 B
Bash
Executable File

#!/bin/bash
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
MIN_ENV_VARS_DOC=./docs/minimal-environment-vars.md
mv ${MIN_ENV_VARS_DOC}{,.validate}
# Generate a new file and check the content is the same
./tools/min-env.sh
/usr/bin/diff ${MIN_ENV_VARS_DOC}{,.validate}
RET=$?
mv ${MIN_ENV_VARS_DOC}{.validate,}
exit $RET