From 0da832023b3d7d0921de1f76acbf6dd2595341d0 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 7 Aug 2025 20:07:34 +0300 Subject: added tecat.tes to standard library: can be installed as the Git textconv filter tecat.tes and repl.tes are now executable scripts, even though they are installed into the $SCITECOPATH. This is still much slower than the Lua version here: https://gist.github.com/rhaberkorn/6534ecf1b05de6216d0a9c33f31ab5f8 --- freebsd/pkg-plist | 1 + lib/Makefile.am | 13 ++++++++++++- lib/repl.tes | 3 ++- lib/tecat.tes | Bin 0 -> 532 bytes 4 files changed, 15 insertions(+), 2 deletions(-) mode change 100644 => 100755 lib/repl.tes create mode 100755 lib/tecat.tes diff --git a/freebsd/pkg-plist b/freebsd/pkg-plist index 3fe8a43..d7dd9a8 100644 --- a/freebsd/pkg-plist +++ b/freebsd/pkg-plist @@ -12,6 +12,7 @@ share/man/man7/%%PROGRAM_PREFIX%%sciteco.7.gz %%DATADIR%%/lib/getopt.tes %%DATADIR%%/lib/lexer.tes %%DATADIR%%/lib/repl.tes +%%DATADIR%%/lib/tecat.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/abaqus.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/ada.tes %%LEXILLA%%%%DATADIR%%/lib/lexers/asciidoc.tes diff --git a/lib/Makefile.am b/lib/Makefile.am index 194802f..ae57c47 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,9 +1,20 @@ +include $(top_srcdir)/bootstrap.am dist_scitecolib_DATA = color.tes lexer.tes session.tes opener.tes \ fnkeys.tes string.tes getopt.tes # standalone scripts -dist_scitecolib_DATA += repl.tes +dist_scitecolib_SCRIPTS = repl.tes tecat.tes + +# Fix up the hash-bang line of installed SciTECO scripts upon +# installation to refer to the installed sciteco binary. +# This takes --program-prefix into account. +# +# FIXME: This will patch the hash-bang line repeatedly. +install-data-hook: + $(SCITECO_FULL) -e "<%i^[ :Q[^A^E\\i]:; @EB'$(DESTDIR)$(scitecolibdir)/^EN[^A^E\\i]'> 1U* \ + EJ-1<%*^[ 0,^Q::@FR'#!^EM^Xsciteco'#!$(SCITECO_INSTALLED)'> \ + :EX" $(dist_scitecolib_SCRIPTS) # Helper script for creating lexer definitions EXTRA_DIST = scite2co.lua diff --git a/lib/repl.tes b/lib/repl.tes old mode 100644 new mode 100755 index 9cfa8c0..b830e8b --- a/lib/repl.tes +++ b/lib/repl.tes @@ -1,10 +1,11 @@ +#!/usr/local/bin/sciteco -m !* * This is a stand-alone script that mimics * classic TECO command lines. * Requires an ANSI-compatible terminal. * * Currently, you must set the terminal characteristics on the outside: - * stty raw opost icrnl && sciteco -m repl.tes + * stty raw opost icrnl && /usr/local/share/sciteco/lib/repl.tes * * You can launch into interactive mode by typing -u#ex * diff --git a/lib/tecat.tes b/lib/tecat.tes new file mode 100755 index 0000000..a09c458 Binary files /dev/null and b/lib/tecat.tes differ -- cgit v1.2.3