The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

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