Files
tryton/.gitlab-scripts/check-template-modules.sh
T
Cédric Krier 1c40ca075e Allow passing the output directory of check scripts as argument
Such that the script can be used to regenerate the files in the repository if
the root directory is passed.
2024-10-31 09:15:23 +01:00

18 lines
441 B
Bash
Executable File

#!/bin/sh
set -eu
OUTPUT=${1:-`mktemp -d`}
find modules -name setup.py -print | while read path
do
path=`dirname "${path}"`
module=`basename "${path}"`
printf "Check $module ... "
cookiecutter --no-input cookiecutter-module -o "${OUTPUT}" module_name="${module}"
for file in tox.ini doc/conf.py doc/requirements-doc.txt
do
cmp "${path}/${file}" "${OUTPUT}/${module}/${file}"
done
printf "OK\n"
done