|
|
|
[
Permlink
| « Hide
]
Charles Oliver Nutter - 15/Jan/08 05:07 PM
We are very interested in any improvements to our UNIX startup scripts, but we are not sh experts. We started using bash because we could not find a way to make it work with simple sh. If there's a way to do what we do now and go back to sh, we'd include it.
I'm trying to use JRuby (1.0.3) on my OpenBSD Box and OpenBSD use ksh (by default). Then I have this problem too.
I made some change in jruby script to could use jruby This fix could resolve #1671 <http://jira.codehaus.org/browse/JRUBY-1671 Hope it's could help other, and hope it's work for *nix with bash. With this change it seems like filename processing breaks in the script:
~/NetBeansProjects/jruby $ bin/jruby test/test_big_decimal.rb Error opening script file: /Users/headius/NetBeansProjects/jruby/tteesstt/tteesstt__bbiigg__ddeecciimmaall..rrb (No such file or directory) Fix if possible for 1.1. It would be nice to not depend on bash...if possible.
Just for the record: This also applies to bin/jruby in JRuby 1.1RC1
Ping! We're pushing out RC3 soon...if there's way to get sh scripts that will do everything our current bash scripts do, across all platforms, we'd love to include them. But the window is rapidly closing.
Revised bin/jruby which works with Solaris /bin/sh. Cygwin stuff commented out due to insufficient knowledge about what it does.
I have now looked at the jruby command under Solaris, and adapted it to use "expr" and "cut" to do string stuff, and changed the arrays to plain single strings.
The cygwin stuff is commented out, as /bin/sh dislikes the syntax and I do not understand what it does so I will not change it. I have understood that the "dash" shell is good for weeding out bashisms from shell scripts, but I have not tested it myself. Let me know if this works for others than me. If not, please run with "sh -xv bin/jruby ...." and attach the output. Not a 100% patch (either attachment as far as I can tell). Bumping. We can fix in point release.
I'm back again with this SH problem.
I made a new patch for jruby sh script. I test it under my default Ksh 5.2.14 and for bash 3.2.33. "Keep It Smart Simple" please. Do not use some bash specific keyword (like "declare" or "{1:3}"). I hope it will work for everyone. My modifications which work for regular command-line elements, but fails for things like -e "puts 'heh'"
Poutype, I started with your patch but it had some old stuff in it (like jruby.base) so it was not right. Also it was not quoting properly for certain arguments which have spaces in them. I thought I modified it to my satisfaction, but it is still broken for things like ./bin/jruby -e 'puts "HEH"'. I uploaded this version as a patch so someone can nudge this along. While people are at it they may also want to look at:
Sorry for the delay, but I always have problem with my OpenBSD KSH based machine ! I made a test with latest trunk from svn...
I'm so sad to couldn't use Jruby under my OS. I can't help on other part because of this shell problem :-/ I probably continue to use my own script to launch jruby :-/ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||