openapi-generator/bin/utils/export_generator.sh
Dec12 | Fujigon fbd4411b22 fix export_generator shell script (#1223)
* fix export_generator shell script

* fix script with bash

* use bash instead of sh
2018-10-14 21:11:59 +08:00

18 lines
495 B
Bash
Executable File

#!/bin/bash
SCRIPT="$0"
echo "# START SCRIPT: $SCRIPT"
if [[ "$1" != "" ]]; then
NAME="$1"
else
echo "Missing argument. Usage e.g.: ./bin/utils/export-generator.sh jaxrs-jersey"
exit 1;
fi
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
java -jar $executable config-help -g $NAME | sed -e 's/CONFIG OPTIONS/CONFIG OPTIONS for '$NAME'\'$'\n''/g' > docs/generators/$NAME.md
echo "Back to the [generators list](README.md)" >> docs/generators/$NAME.md