From 89b7b67a13ebb7965cc7f13ad0595e2194a2d34c Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Wed, 3 Jul 2024 15:48:04 +0200 Subject: add sqmail-4.2.29a --- package/rts | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 package/rts (limited to 'package/rts') 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 -- cgit v1.2.3