diff options
| author | fukachan <fukachan> | 2004-11-24 02:15:11 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-11-24 02:15:11 +0000 |
| commit | 2bb8e9371b8fadf8fd62c5e07adcb49c10deb29a (patch) | |
| tree | 4aee6b3d870e47f2ec1d222ccf13c674f22d4fa7 /regress/simulation/emul_fmlpl_command.sh | |
| parent | 2976d4030b49f05fc1ce934ac74a4f96fdf3a5ad (diff) | |
| download | fml8-2bb8e9371b8fadf8fd62c5e07adcb49c10deb29a.tar.gz fml8-2bb8e9371b8fadf8fd62c5e07adcb49c10deb29a.tar.bz2 fml8-2bb8e9371b8fadf8fd62c5e07adcb49c10deb29a.zip | |
fml.pl emulation utility
Diffstat (limited to 'regress/simulation/emul_fmlpl_command.sh')
| -rwxr-xr-x | regress/simulation/emul_fmlpl_command.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/regress/simulation/emul_fmlpl_command.sh b/regress/simulation/emul_fmlpl_command.sh new file mode 100755 index 00000000..36bdc138 --- /dev/null +++ b/regress/simulation/emul_fmlpl_command.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# +# $FML: emul_command.sh,v 1.5 2004/03/14 07:01:08 fukachan Exp $ +# + +buf=$PWD/__command$$__ +trap "rm -f $buf" 0 1 3 15 + +header_file=${header:-text=empty} + +# option +option=${OPTION:-test_key=test_value} + + +DO () { + ( + pwd=`pwd` + cd ../.. || exit 1 + pwd + + test -f $msg || return; + + maincf=/tmp/main.cf.$$ + trap "rm -f $maincf" 0 1 3 15 + sed -e "s@\$pwd@$PWD@g" \ + -e "s@^debug.*@debug = $debug@" \ + regress/simulation/main.cf > $maincf + + + cp fml/libexec/loader /tmp/fml.pl + + regress/message/scramble.pl $msg |\ + ${PERL:-perl} -w /tmp/fml.pl -c $maincf \ + -o $option \ + --ctladdr \ + /var/spool/ml/elena + echo "-- exit code: $?" + ) +} + +(cd ../../fml/etc/;sh .gen.sh) + +cat ./../testmails/$header_file > $buf +cat >> $buf + +list=$buf + +for msg in $list +do + DO $msg +done + +exit 0 + |
