The R Project SVN R

Rev

Rev 51453 | Rev 51510 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 51453 Rev 51509
Line 1... Line 1...
1
#!@R_SHELL@
1
#!@R_SHELL@
2
##
2
##
3
## Rdiff -- diff 'without R version'
3
## Rdiff -- diff 'without R version'
4
 
4
 
5
revision='$Rev: 51453 $'
5
revision='$Rev: 51509 $'
6
version=`set - ${revision}; echo ${2}`
6
version=`set - ${revision}; echo ${2}`
7
version="R output diff: ${R_VERSION} (r${version})
7
version="R output diff: ${R_VERSION} (r${version})
8
 
8
 
9
Copyright (C) 2000-2008 The R Core Development Team.
9
Copyright (C) 2000-2008 The R Core Development Team.
10
This is free software; see the GNU General Public License version 2
10
This is free software; see the GNU General Public License version 2
Line 65... Line 65...
65
 
65
 
66
tmpfile=${TMPDIR-/tmp}/${bfile}-d.${$}
66
tmpfile=${TMPDIR-/tmp}/${bfile}-d.${$}
67
 
67
 
68
${SED} -e "${scriptold}" -e "${scriptnew}" -e "${s1}" -e "${s2}" ${ffile} | ${EGREP} -v "${pattern}" > ${tmpfile}
68
${SED} -e "${scriptold}" -e "${scriptnew}" -e "${s1}" -e "${s2}" ${ffile} | ${EGREP} -v "${pattern}" > ${tmpfile}
69
## some packages ship .Rout.save with CRLF endings
69
## some packages ship .Rout.save with CRLF endings
-
 
70
## OTOH, Solaris's /usr/ucb/tr strips 'r' here
70
(tr -d '\r' <  ${tfile} | ${SED} -e "${scriptold}" -e "${scriptnew}" -e "${s1}" -e "${s2}" | \
71
(tr -d '\r' <  ${tfile} | ${SED} -e "${scriptold}" -e "${scriptnew}" -e "${s1}" -e "${s2}" | \
71
  ${EGREP} -v "${pattern}" | \
72
  ${EGREP} -v "${pattern}" | \
72
  diff -bw ${tmpfile} - ) && exitstatus=0
73
  diff -bw ${tmpfile} - ) && exitstatus=0
73
 
74
 
74
rm -f ${tmpfile}
75
rm -f ${tmpfile}