The R Project SVN R

Rev

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

Rev 52274 Rev 52367
Line 1... Line 1...
1
#
1
#
2
# ${R_HOME}/bin/Sweave
2
# ${R_HOME}/bin/Sweave
3
 
3
 
4
revision='$Rev: 52274 $'
-
 
5
version=`set - ${revision}; echo ${2}`
-
 
6
version="Sweave front-end: ${R_VERSION} (r${version})
-
 
7
 
-
 
8
Copyright (C) 2006-10 The R Core Development Team.
-
 
9
This is free software; see the GNU General Public License version 2
-
 
10
or later for copying conditions.  There is NO warranty."
-
 
11
 
-
 
12
usage="Usage: R CMD Sweave file
-
 
13
 
-
 
14
A simple front-end for Sweave()
-
 
15
 
-
 
16
Options:
-
 
17
  -h, --help		print short help message and exit
-
 
18
  -v, --version		print version info and exit
-
 
19
 
-
 
20
Report bugs to <r-bugs@r-project.org>."
-
 
21
 
-
 
22
case ${1} in
-
 
23
  -h|--help)
-
 
24
     echo "${usage}"; exit 0 ;;
-
 
25
  -v|--version)
-
 
26
     echo "${version}"; exit 0 ;;
-
 
27
esac
-
 
28
 
-
 
29
R_EXE="${R_HOME}/bin/R"
4
R_EXE="${R_HOME}/bin/R"
30
echo "library(\"utils\"); Sweave(\"$1\")" | \
-
 
31
  "${R_EXE}" --vanilla --slave
5
echo "utils:::.Sweave(\"$1\")" | "${R_EXE}" --vanilla --slave