X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trunk%2Fexec%2Fcran2deb;h=3b2794acf3ba570e3622072d037c1257e5a6cff1;hb=86e55bf48a319cf529b4a3519a11c0d94d47414b;hp=7efedc751a484296ff30eb77cc3ed568cebc6635;hpb=85dce7302c437f286a26751f35b2f80e54393db2;p=cran2deb.git diff --git a/trunk/exec/cran2deb b/trunk/exec/cran2deb index 7efedc7..3b2794a 100755 --- a/trunk/exec/cran2deb +++ b/trunk/exec/cran2deb @@ -7,4 +7,10 @@ if [ ! -x "$root/exec/$cmd" ]; then echo unknown command $cmd exit 1 fi -"$root/exec/$cmd" "$root" $* + +precmd="" +if [ "$(id -un)" != c2d ]; then + precmd="sudo -u c2d -E" +fi + +$precmd "$root/exec/$cmd" "$root" $*