[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Ruby question: Purpose of "ruby -run"?

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2005-03-20 15:23:01 CET

Max Bowsher wrote:
> +INSTALL_EXTRA_SWIG_RB=\
> + $(RUBY) -run -e mkdir -- -p
> $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/svn/ext; \
> + (cd $(SWIG_RB_DIR); \
> + find svn \
> + -name "*.rb" \
> + -exec $(RUBY) -run -e install -- \
> + $(SWIG_RB_DIR)/\{\} \
> + $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/\{\} \;)
> +
>
> What is the advantage of "ruby -run" over invoking the command directly?

The -r flag to ruby pulls in the specified module, in this case the 'un'
module, which holds ruby implementations of various common command line
utilities (rm, mkdir, etc.). On a unix system there's probably little
reason to use it, other than the fact that you can be reasonably certain
that they will work the same on various systems. It's more useful on
say win32 or something where you aren't likely to have them.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 20 15:24:10 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.