X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tags%2Fpre-dual%2Fexec%2Fcran2deb;fp=tags%2Fpre-dual%2Fexec%2Fcran2deb;h=3b2794acf3ba570e3622072d037c1257e5a6cff1;hb=ab9547f1dd3779e34528a7a638ed085d5b9c5e26;hp=0000000000000000000000000000000000000000;hpb=4baac28764128067cb2fd6343321e7e0f522bdfd;p=cran2deb.git diff --git a/tags/pre-dual/exec/cran2deb b/tags/pre-dual/exec/cran2deb new file mode 100755 index 0000000..3b2794a --- /dev/null +++ b/tags/pre-dual/exec/cran2deb @@ -0,0 +1,16 @@ +#!/bin/sh +umask 002 +root=$(r -e 'suppressMessages(library(cran2deb));cat(system.file(package="cran2deb"),file=stdout())') +cmd=$1 +shift +if [ ! -x "$root/exec/$cmd" ]; then + echo unknown command $cmd + exit 1 +fi + +precmd="" +if [ "$(id -un)" != c2d ]; then + precmd="sudo -u c2d -E" +fi + +$precmd "$root/exec/$cmd" "$root" $*