File: sendmail

package info (click to toggle)
dgit 14.8
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,476 kB
  • sloc: perl: 14,136; sh: 7,648; makefile: 346; python: 334; tcl: 69
file content (34 lines) | stat: -rwxr-xr-x 668 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
set -e

cd "$DGIT_TEST_TMP"

exec >sendmail.last
date
printf "sendmail %s\n" "$*"
cat

exec >>sendmail.all
echo '----------------------------------------------------------------'
cat sendmail.last
echo

if read <sendmail.seq seq; then
	seq=$(( $seq + 1 ))
	echo $seq >sendmail.seq
	mkdir -p sendmail.msgs
	sed '1,2d; /^$/,$d' <sendmail.last >sendmail.msgs/$seq.header
fi

if [ "$DGIT_TEST_MUNPACK" ]; then
	set -x
	rm -rf sendmail.munpack
	mkdir sendmail.munpack

	sed 1,2d <sendmail.last | \
	$DGIT_TEST_MUNPACK -t -C sendmail.munpack

	test -f sendmail.munpack/part1
	test -f sendmail.munpack/t2u_fake-job_tag.txt
	# there might be a log transcript too
fi