From 3319d70e4e8fd89fe6140e95504a718717bd4e80 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 15 Mar 2023 14:24:10 -0500 Subject: Rewrite with sh --- README.md | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4b68c96..f6f03d8 100644 --- a/README.md +++ b/README.md @@ -2,35 +2,24 @@ ## include shell files built to scratch a personal itch. SHIN is an awk(1) script that plops include -files in to .shin files. here's the usage text: +files in to .shin files. -``` -SHIN: include shell files in other shell files -USAGE: shin FILE... - -FILEs named FILE.shin will be built to FILE.sh in the same directory. -to include files in shin files, use the following comment syntax: +recently rewritten. now use it like this: -#< INCLUDE +```sh +#!/bin/sh -shin will add INCLUDE below that comment, as well as a comment -denoting the end of INCLUDE. -``` +. shin # if shin is in $PATH this should Just Work(TM) -it's really that simple. and stupid. +do_stuff_here -## configuration +shin included_file -SHIN will look for include files in the current directory, unless you set the -SHINPATH environment variable. $SHINPATH is a colon-separated list of -directories like $PATH or $MANPATH. - -## extras +other_stuff +``` -`shin.awk` is the plain awk script. because awk is dumb about handling -arguments, `shin` is a shell script that will do `shin.awk`'s work unless you -pass `shin -h`, in which case it will print a helpful message. +you can run the above script itself, or you can "compile" it by running `shin -c