summaryrefslogtreecommitdiff
path: root/regress/simulation/emul_fmlpl_command.sh
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-11-24 02:15:11 +0000
committerfukachan <fukachan>2004-11-24 02:15:11 +0000
commit2bb8e9371b8fadf8fd62c5e07adcb49c10deb29a (patch)
tree4aee6b3d870e47f2ec1d222ccf13c674f22d4fa7 /regress/simulation/emul_fmlpl_command.sh
parent2976d4030b49f05fc1ce934ac74a4f96fdf3a5ad (diff)
downloadfml8-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-xregress/simulation/emul_fmlpl_command.sh54
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
+