[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wrapper script issue



On Fri, Feb 08, 2008 at 03:31:54PM -0700, ChadDavis wrote:
> 
>     Then I probably am not following what you're doing. You don't
>     show the shebang lines in this message, but I thought you wanted
>     your application to use a custom wrapper script, and not run the
>     packaged ruby1.8 directly. On my system /usr/bin/ruby1.8 is a
>     binary, and not a shell script as I thought you were showing.
>
> I replaced the ruby1.8 binary, in /usr/bin, with a wrapper script that
> sets an environment variable and then invokes the binary, which I
> moved to /etc/ alternatives ( perhaps not exactly the way alternatives
> is meant to be used, but I'm kind of a noob )
> 
> Here's the wrapper script:
> 
> #!/bin/sh
> export RUBYOPT=rubygems
> exec /etc/alternatives/ruby1.8 "$@"

> This script is at /usr/bin/ruby1.8 
> 
> Let me know if I'm doing something bizarre.  It's actually my effort at doing
> things the *right* way, so any advice would be accepted and welcomed. 

It sounds bizarre to me.  I think you mentioned following some directions
somwehere, so maybe you missed something?  I don't have /etc/alternatives/ruby1.8
on my system; what does it point to?  It's probably a symlink, or maybe a chain
of several, and it wouldn't suprise me if it pointed back to /usr/bin/ruby1.8.

I'd say that any time you're messing around in /usr/bin/ replacing things
you ought to know what you're doing, or you're there's a good chance
you're going to break your system. If you want a viable system, then
leave that and other system directories alone, and put your customized
stuff in /usr/local/bin/ or equivalent, perhaps ~/bin/, etc.  But I'm
repeating myself...

-- 
Ken Irving, fnkci+debianuser@uaf.edu


Reply to: