~ubuntu-branches/ubuntu/hardy/sigscheme/hardy-proposed

« back to all changes in this revision

Viewing changes to make-report.sh

  • Committer: Bazaar Package Importer
  • Author(s): NIIBE Yutaka
  • Date: 2007-01-29 15:31:24 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070129153124-j5fcqyrwcfbczma7
Tags: 0.7.4-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
MYNAME=`whoami`
 
4
ADDR="sigscheme-ja@googlegroups.com"
 
5
TMPDIR=/tmp
 
6
TMPFILE=$TMPDIR/sigscheme-report.$$
 
7
PERL=perl
 
8
MAKE=
 
9
OPTS="--enable-euccn --enable-eucjp --enable-euckr --enable-sjis"
 
10
#OPTS="$OPTS --enable-maintainer-mode"
 
11
 
 
12
for cmd in gmake gnumake make; do
 
13
  if $cmd --version 2>/dev/null | grep -q GNU; then
 
14
    MAKE=$cmd
 
15
    break
 
16
  fi
 
17
done
 
18
 
 
19
if test "x$MAKE" != x && $PERL -v >/dev/null; then
 
20
  (./configure $OPTS && $MAKE clean >/dev/null && $MAKE >/dev/null \
 
21
   && $MAKE check && echo 'all tests passed') 2>&1 | tee $TMPFILE
 
22
  if grep -q 'all tests passed' $TMPFILE; then
 
23
    result='PASS'
 
24
  else
 
25
    result='FAIL'
 
26
  fi
 
27
  pkg=`perl -ne 'print $1 if /^Package:\s+(.+)$/' $TMPFILE`
 
28
  host=`perl -ne 'print $1 if /^host \(compile for\):\s+(.+)$/' $TMPFILE`
 
29
  compiler=`perl -ne 'print $1 if /^Compiler:\s+(.+)$/' $TMPFILE`
 
30
  compiler_ver=`perl -ne 'print $1 if /^Compiler version:\s+(.+)$/' $TMPFILE`
 
31
 
 
32
  cat >report.mail <<EOT
 
33
To: ${ADDR}
 
34
Subject: ${result}: ${pkg} ${host} ${compiler} ${compiler_ver}
 
35
 
 
36
EOT
 
37
 
 
38
  #cat $TMPFILE >>report.mail
 
39
  # Hide reporter's private information.
 
40
  sed -e "s/\\/${MYNAME}\\//\\/<username>\\//g" $TMPFILE >>report.mail
 
41
 
 
42
  rm -f $TMPFILE
 
43
  echo
 
44
  echo "File 'report.mail' has been created. Please send it to us."
 
45
  exit 0
 
46
else
 
47
  echo "GNU make or Perl not found. Install them."
 
48
  exit 1
 
49
fi