Add validation script for min env vars documentation

Change-Id: I46ffa01d0097916055857c3f968e716e0229795f
Partially-implements: blueprint add-min-env-vars-gate
This commit is contained in:
Martin André 2015-07-01 17:48:34 +09:00
parent 1c5988e642
commit 97e8dc5e20

17
tools/validate-min-env-vars.sh Executable file
View File

@ -0,0 +1,17 @@
#!/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