summaryrefslogtreecommitdiff
path: root/package/rts
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-03 15:48:04 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-03 15:48:04 +0200
commit89b7b67a13ebb7965cc7f13ad0595e2194a2d34c (patch)
tree25efd77a90ae87236e6730d8ea3846bbe0fd126f /package/rts
add sqmail-4.2.29asqmail-4.2
Diffstat (limited to 'package/rts')
-rwxr-xr-xpackage/rts76
1 files changed, 76 insertions, 0 deletions
diff --git a/package/rts b/package/rts
new file mode 100755
index 0000000..d213f0d
--- /dev/null
+++ b/package/rts
@@ -0,0 +1,76 @@
+#!/bin/sh
+shout() { echo "$0: $@" >&2; }
+barf() { shout "fatal: $@"; exit 111; }
+safe() { "$@" || barf "cannot $@"; }
+
+umask 022
+[ -d package ] || barf "no package directory"
+[ -d src ] || barf "no src directory"
+[ -d compile ] || barf "no compile directory"
+[ -d etc ] || barf "no etc directory"
+[ -f `head -1 src/conf-tcpbin`/tcpserver ] || barf "tcpserver not installed"
+
+for i in `sed -e '/^it-/!d' -e 's/^it-//' < compile/it=d`
+do
+ all="$all $i"
+done
+usage() { shout "usage: package/rts [ [-]$all ]"; exit 100; }
+
+targets=""
+if [ $# -eq 0 ]
+then
+ targets="$all"
+else
+ if [ "$1" = "-" ]
+ then
+ shift
+ suppress=":"
+ for i in ${1+"$@"}
+ do
+ case "$all " in
+ *\ $i\ *)
+ ;;
+ *)
+ usage
+ ;;
+ esac
+ suppress="$suppress$i:"
+ done
+ for i in $all
+ do
+ case "$suppress" in
+ *:$i:*)
+ ;;
+ *)
+ targets="$targets $i"
+ ;;
+ esac
+ done
+ else
+ for i in ${1+"$@"}
+ do
+ case "$all " in
+ *\ $i\ *)
+ ;;
+ *)
+ usage
+ ;;
+ esac
+ targets="$targets $i"
+ done
+ fi
+fi
+
+[ "X$all" != "X" ] && [ "X$targets" = "X" ] && usage
+
+here=`env - PATH=$PATH pwd`
+safe cd compile
+PATH="$here/compile:/command:$PATH"
+export PATH
+. $here/compile/rts.it > $here/compile/out.it 2>&1
+cat -v $here/compile/out.it | diff - $here/compile/exp.it
+for i in $targets
+do
+ . $here/compile/rts.$i 2>&1 | cat -v > $here/compile/out.$i
+ diff $here/compile/out.$i $here/compile/exp.$i
+done