]> git.etc.gen.nz Git - spong.git/commitdiff
added files into CVS
authorStephen L Johnson <sjohnson@monsters.org>
Mon, 9 Oct 2000 04:47:29 +0000 (04:47 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Mon, 9 Oct 2000 04:47:29 +0000 (04:47 +0000)
utils/findVars [new file with mode: 0755]
utils/mkTarg [new file with mode: 0755]

diff --git a/utils/findVars b/utils/findVars
new file mode 100755 (executable)
index 0000000..50ce2db
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+SCRIPT=`basename $0`
+die() {
+   echo "Usage: $SCRIPT FILE"
+   echo "$*"
+   exit 1
+}
+[ $# -eq 1 ] || die "Found $# ARGS not 1"
+[ -f $1 ] || die "No FILE $1"
+grep "@@" $1 | sed -e 's/[^@]*@@//' -e 's/@@[^@]*//' | sort | uniq
diff --git a/utils/mkTarg b/utils/mkTarg
new file mode 100755 (executable)
index 0000000..dfafaf0
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+SCRIPT=`basename $0`
+die() {
+   echo "Usage: $SCRIPT NAME"
+   echo " where NAME.in is a file"
+   echo "$*"
+   exit 1
+}
+set -e
+[ $# -eq 1 ] || die "Found $# ARGS not 1"
+NAME=$1
+shift
+[ -f $NAME.in ] || die "No FILE $NAME.in"
+echo "$NAME:   $NAME.in"
+echo ' sed -e \'
+for var in `findVars $NAME.in`
+do
+       echo '  "s%@@'$var'@@%$('$var')%g" \'
+done
+echo ' $< > $@'