]> git.donarmstrong.com Git - cran2deb.git/blob - tags/pre-dual/R/util.R
reprepro version before the massacre
[cran2deb.git] / tags / pre-dual / R / util.R
1 iterate <- function(xs,z,fun) {
2     y <- z
3     for (x in xs)
4         y <- fun(y,x)
5     return(y)
6 }
7
8 chomp <- function(x) {
9     # remove leading and trailing spaces
10     return(sub('^[[:space:]]+','',sub('[[:space:]]+$','',x)))
11 }
12
13 host_arch <- function() {
14     # return the host system architecture
15     system('dpkg-architecture -qDEB_HOST_ARCH',intern=T)
16 }
17
18 err <- function(...) {
19     error(...)
20     exit()
21 }
22
23 exit <- function() {
24     q(save='no')
25 }