File: uude-1

package info (click to toggle)
sharutils 1%3A4.9-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 6,272 kB
  • ctags: 4,029
  • sloc: ansic: 31,488; sh: 5,958; perl: 1,786; makefile: 610; pascal: 293; yacc: 291; sed: 16
file content (39 lines) | stat: -rwxr-xr-x 893 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
#! /bin/sh
# uudecode output file handling; cf. ../src/ChangeLog 2002-07-06

trap 'rm -fr $tmpfiles' 1 2 3 15

tno=1

tmpfiles="test.bin uudata${tno} uude-test${tno}.err"
rm -fr $tmpfiles

echo "Was schlimm ist" > uudata${tno}
: ${LN=ln}
${LN} -sf uudata${tno} test.bin

: ${UUDECODE=uudecode}
# : ${top_srcdir=..}
LC_MESSAGES=C LC_ALL= \
${UUDECODE} ${top_srcdir}/tests/testdata 2>&1 \
  | sed 's/.*\(not following symlink (test.bin)\).*/\1/' > uude-test${tno}.err

rm -f test.bin
mkfifo test.bin
LC_MESSAGES=C LC_ALL= \
${UUDECODE} ${top_srcdir}/tests/testdata 2>&1 \
  | sed 's/.*\(denied writing FIFO (test.bin)\).*/\1/' >>uude-test${tno}.err

tmpfiles="$tmpfiles uude-test${tno}.ok"
cat << EOF > uude-test${tno}.ok
not following symlink (test.bin)
denied writing FIFO (test.bin)
EOF

: ${DIFF=diff}
${DIFF} uude-test${tno}.ok uude-test${tno}.err
result=$?

rm -fr $tmpfiles

exit $result