]> git.donarmstrong.com Git - cran2deb.git/blobdiff - branch/multisys/R/zzz.R
db: record which system a particular build was for.
[cran2deb.git] / branch / multisys / R / zzz.R
index 54f1b214782088e969681a36feb4feb93dabd030..9bf3047c14457d46c6ba4d01d2da86f7b64ff0cb 100644 (file)
@@ -1,18 +1,18 @@
 .First.lib <- function(libname, pkgname) {
     global <- function(name,value) assign(name,value,envir=.GlobalEnv)
-    global("which_sys", Sys.getenv('CRAN2DEB_SYS','debian-amd64'))
-    if (!length(grep('^[a-z]+-[a-z0-9]+$',which_sys))) {
+    global("which_system", Sys.getenv('CRAN2DEB_SYS','debian-amd64'))
+    if (!length(grep('^[a-z]+-[a-z0-9]+$',which_system))) {
         stop('Invalid system specification: must be of the form name-arch')
     }
-    global("host_arch", gsub('^[a-z]+-','',which_sys))
+    global("host_arch", gsub('^[a-z]+-','',which_system))
     global("maintainer", 'cran2deb autobuild <cran2deb@example.org>')
     global("root", system.file(package='cran2deb'))
     global("cache_root", '/var/cache/cran2deb')
-    global("pbuilder_results",  file.path('/var/cache/cran2deb/results',which_sys))
-    global("pbuilder_config",   file.path('/etc/cran2deb/sys',which_sys,'pbuilderrc'))
-    global("dput_config",       file.path('/etc/cran2deb/sys',which_sys,'dput.cf'))
-    global("dinstall_config",   file.path('/etc/cran2deb/sys',which_sys,'mini-dinstall.conf'))
-    global("dinstall_archive",  file.path('/etc/cran2deb/archive',which_sys))
+    global("pbuilder_results",  file.path('/var/cache/cran2deb/results',which_system))
+    global("pbuilder_config",   file.path('/etc/cran2deb/sys',which_system,'pbuilderrc'))
+    global("dput_config",       file.path('/etc/cran2deb/sys',which_system,'dput.cf'))
+    global("dinstall_config",   file.path('/etc/cran2deb/sys',which_system,'mini-dinstall.conf'))
+    global("dinstall_archive",  file.path('/etc/cran2deb/archive',which_system))
     global("r_depend_fields", c('Depends','Imports')) # Suggests, Enhances
     global("scm_revision", 'svn:$Id$')
     global("changesfile", function(srcname,version='*') {
@@ -25,5 +25,5 @@
     if (file.exists(cache)) {
         load(cache,envir=.GlobalEnv)
     }
-    message(paste('I: cran2deb',scm_revision,'building for',which_sys))
+    message(paste('I: cran2deb',scm_revision,'building for',which_system))
 }