basho/basho_bench

R scripts are broken

mrdrmmn opened this issue · 3 comments

All of the .r scripts in priv/ are broken. The all start with the following shebang line:

!/usr/bin/env Rscript --vanilla

This causes the system to look in the path for a binary called 'Rscript --vanilla'.

This behavior is mentioned in the wikipedia article located at http://en.wikipedia.org/wiki/Shebang_(Unix)

Here is the relevant snip:

Another portability problem is the interpretation of the command arguments. Some systems, including Linux, do not split up the arguments;[11] for example, when running the script with the first line like,

!/usr/bin/env python -c

That is, python -c will be passed as one argument to /usr/bin/env, rather than two arguments. Cygwin also behaves this way.

This can be resolve in multiple ways, and perhaps the easiest is to simply modify the make file and instead of calling the .r scripts directly, call 'Rscript --vanilla priv/script.r

booo commented

Do we actually need the --vanilla option?

Not sure if the above question is directed at me, but I can say I don't really know. However, taking a quick glance at the man page, I see this:

--vanilla
Combine --no-save, --no-restore, --no-site-file --no-init-file and --no-environ

Based on that, I would say it is absolutely a good way to ensure that you have a known enviroment, so it is probably a good thing to ensure that someone with a non-standard configuration will not have problems.

Although, at the same time, it is completely non-functional as it stands, so removing the --vanilla and calling it a day would make it work for a larger percentage of people than it 0. :)

Sorry about the absurd delay!