From a7a348461b24b8ffe969a48cd804ab5b8a3d7469 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 30 Jan 2024 23:42:09 -0600 Subject: Begin subtext.sh --- subtext.sh | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100755 subtext.sh (limited to 'subtext.sh') diff --git a/subtext.sh b/subtext.sh new file mode 100755 index 0000000..d845955 --- /dev/null +++ b/subtext.sh @@ -0,0 +1,57 @@ +#!/bin/sh + +stawk() { + awk -f subtext.awk "$@" # SUBTEXT AWK SCRIPT HERE +} + +usage() { + cat>&2 <&2 'Unknown option -%s\n' "$OPTARG"; + usage 1 ;; + (*) usage 1 ;; + esac + done +} + +main() { + configure "$@" + shift $((OPTIND-1)) + stawk -vsopath="$ST_SOPATH" "$@" | + if "$ST_PIPE_SH" + then sh + else cat + fi +} + +die() { + ec="$1"; shift + printf >&2 '!! %s\n' "$*" + exit "$ec" +} + +main "$@" -- cgit 1.4.1-21-gabe81