Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
rnc->odd: fix statistics generation, added rng (XML-Syntax) output
  • Loading branch information
EsGeh authored and EsGeh committed Sep 18, 2019
1 parent 80ff5c7 commit e108bbd
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion scripts/update_output.sh
Expand Up @@ -7,7 +7,7 @@ DEP_DIR=$BASE_DIR/dependencies
INTERMEDIATE_DIR="$BASE_DIR/schema/intermediate"
INTERMEDIATE_OUTPUT_0=( "cleaned" "statistics" )
INTERMEDIATE_OUTPUT_1=( "cleaned" "statistics" )
INTERMEDIATE_OUTPUT_2=( "cleaned" "statistics" "rnc" "schema" "schematron" )
INTERMEDIATE_OUTPUT_2=( "cleaned" "statistics" "rnc" "rng" "schema" "schematron" )

# break script on first error
# set -e
Expand Down Expand Up @@ -57,6 +57,7 @@ function im_output () {
$SCRIPT_DIR/utils/for_each_input.sh \
--input-dir "$dir/generated/odd_cleaned" \
--output-dir "$dir/generated/statistics" \
--suffix '.md' \
--print-cmd \
--log-file "$dir/logs/statistics.log" \
-- \
Expand All @@ -73,6 +74,7 @@ function im_output () {
$SCRIPT_DIR/utils/for_each_input.sh \
--input-dir "$dir/generated/statistics" \
--output-dir "$dir/generated/statistics_html" \
--suffix '.html' \
--print-cmd \
--log-file "$dir/logs/statistics_html.log" \
-- \
Expand Down Expand Up @@ -102,6 +104,26 @@ function im_output () {
|| exit 1
fi

if [[ " ${dump_these_resources[@]} " =~ " rng " ]]; then
echo "ODD -> RELAX-NG..."
local local_src_opt=""
if [[ "$local_src" != "" ]]; then
local_src_opt="--localsource='$local_src'"
fi
$SCRIPT_DIR/utils/for_each_input.sh \
--input-dir "$dir/odd" \
--output-dir "$dir/generated/rng" \
--suffix '.rng' \
--log-file "$dir/logs/teitorelaxng.log" \
--print-cmd \
-- \
"$DEP_DIR/Stylesheets/bin/teitorelaxng" \
"$local_src_opt" \
'$INPUT' '$OUTPUT' \
| sed 's/^/ /' \
|| exit 1
fi

if [[ " ${dump_these_resources[@]} " =~ " schema " ]]; then
echo "ODD -> XML Schema..."
local local_src_opt=""
Expand Down

0 comments on commit e108bbd

Please sign in to comment.