summaryrefslogtreecommitdiffhomepage
path: root/pipeline/one.sh
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-10-05 16:00:39 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-10-05 16:00:39 -0400
commitad7df51055c5908059d5cb88793d7a14f21b5824 (patch)
tree9496b1705f20095f1661ebe523571e91ddc23676 /pipeline/one.sh
parentformat 2.1: the poem, and a note mark of a symbol and a number (diff)
format 2.1: the pipeline reads with ocda-read
sisudoc-ocda-lib now has a reader, ocda-read, in D and in Gleam, which reads every form. The pipeline runs it: one.sh read-d and read-g, passing the modes after the file, and read.sh taking its --tree from the .ssp and the .ocda.db in both languages. The two older readers are still built and run beside it. build.sh built the D library's two programs separately into the one result link, so the second replaced the first and one.sh dump-d found no ocda-dump after a clean build. The library's default is now all three programs, built once. flake.lock, in dlang/ and gleam/, now pins the library at the commit that brings ocda-read, and nixpkgs as that commit locks it. (assisted by Claude-Code)
Diffstat (limited to 'pipeline/one.sh')
-rwxr-xr-xpipeline/one.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/pipeline/one.sh b/pipeline/one.sh
index 18ffc5f..55e9ca6 100755
--- a/pipeline/one.sh
+++ b/pipeline/one.sh
@@ -1,10 +1,12 @@
-#!/bin/sh
+#!/usr/bin/env sh
# One tool, one document: the answer to "how do I run this by hand?".
#
# sh pipeline/one.sh <tool> <file> [lang]
#
# where <tool> is one of
#
+# read-d read-g ocda-read, the library's reader of every form; takes its
+# modes after the file: one.sh read-d <file> en --tree
# ssp-d ssp-g the .ssp readers, D and Gleam
# db-d db-g the .ocda.db readers
# dump-d dump-g the library's canonical dump of the whole model
@@ -24,6 +26,8 @@ file=${2:?usage: one.sh <tool> <file> [lang]}
lang=${3:-}
case $tool in
+ read-d) shift; exec "$OCDA_LIB/dlang/result/bin/ocda-read" "$@" ;;
+ read-g) shift; exec "$OCDA_LIB/gleam/result/bin/ocda-read" "$@" ;;
ssp-d) exec "$SSP_READER/dlang/result/bin/ssp-reader" "$file" ;;
ssp-g) exec "$SSP_READER/gleam/result/bin/ssp_reader" "$file" ;;
db-d) exec "$DB_READER/dlang/result/bin/ocda-db-reader" "$file" ;;