The R Project SVN R

Rev

Rev 11515 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11515 Rev 11529
1
#!/bin/sh
1
#!/bin/sh
2
##
2
##
3
## Rd2txt -- Convert man pages (*.Rd help files) to plain text.
3
## Rd2txt -- Convert man pages (*.Rd help files) to plain text.
4
 
4
 
5
revision='$Revision: 1.6 $'
5
revision='$Revision: 1.7 $'
6
version=`set - ${revision}; echo ${2}`
6
version=`set - ${revision}; echo ${2}`
7
version="Rd2txt ${version}
7
version="Rd2txt ${version}
8
 
8
 
9
Copyright (C) 2000 The R Core Development Team.
9
Copyright (C) 2000 The R Core Development Team.
10
This is free software; see the GNU General Public Licence version 2
10
This is free software; see the GNU General Public Licence version 2
11
or later for copying conditions.  There is NO warranty."
11
or later for copying conditions.  There is NO warranty."
12
 
12
 
13
usage="Usage: R CMD Rd2txt [options] file
13
usage="Usage: R CMD Rd2txt [options] file
14
 
14
 
15
Generate plain text output from the Rd source specified by file.
15
Generate plain text output from the Rd source specified by file.
16
 
16
 
17
Options:
17
Options:
18
  -h, --help		print short help message and exit
18
  -h, --help		print short help message and exit
19
  -v, --version		print version info and exit  
19
  -v, --version		print version info and exit  
20
 
20
 
21
Report bugs to <r-bugs@r-project.org>."  
21
Report bugs to <r-bugs@r-project.org>."  
22
 
22
 
23
case "${1}" in
23
case "${1}" in
24
  -h|--help)
24
  -h|--help)
25
    echo "${usage}"; exit 0 ;;
25
    echo "${usage}"; exit 0 ;;
26
  -v|--version)
26
  -v|--version)
27
    echo "${version}"; exit 0 ;;
27
    echo "${version}"; exit 0 ;;
28
  *)
-
 
29
    break ;;
-
 
30
esac
28
esac
31
 
29
 
32
exec ${R_HOME}/bin/Rdconv -t txt ${1}
30
exec ${R_HOME}/bin/Rdconv -t txt ${1}
33
 
31
 
34
### Local Variables: ***
32
### Local Variables: ***
35
### mode: sh ***
33
### mode: sh ***
36
### sh-indentation: 2 ***
34
### sh-indentation: 2 ***
37
### End: ***
35
### End: ***