3 root=$(r -e 'suppressMessages(library(cran2deb));cat(system.file(package="cran2deb"),file=stdout())')
6 if [ -e /etc/cran2deb/config ]; then
7 . /etc/cran2deb/config;
8 elif [ -r ~/.cran2deb_config ]; then
13 if [ "x" = "x$cmd" ]; then
17 if [ ! -x "$root/exec/$cmd" ]; then
18 echo unknown command $cmd
24 # there's no reason not to run cran2deb as a local user
26 # if [ "$(id -un)" != c2d ]; then
27 # precmd="sudo -u c2d -E"
30 if [ "web" = "$cmd" ]; then
31 # web uses getopt and would be irritated by the "$root" argument
32 $precmd "$root/exec/$cmd" $*
34 $precmd "$root/exec/$cmd" "$root" $*