Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port bash launcher to sh #7024

Merged
merged 16 commits into from Jan 31, 2022
Merged

Port bash launcher to sh #7024

merged 16 commits into from Jan 31, 2022

Conversation

mrnoname1000
Copy link
Contributor

The hardest thing to port is arrays, so I had the idea to store un-expanded variables in a string, then expand them with eval later. It's a little fragile to maintain but it works. Some documentation would probably be necessary to avoid unsafe evals.

I'm also not sure what to call the new script. I changed the shebang to /bin/sh for testing purposes but the filename still ends in .bash, and users may rely on that file being there.

Depends on #7022.

@mrnoname1000 mrnoname1000 marked this pull request as ready for review January 21, 2022 16:07
@mrnoname1000 mrnoname1000 marked this pull request as draft January 21, 2022 16:08
@headius
Copy link
Member

headius commented Jan 21, 2022

Nobody should be relying on jruby.bash being there. We copy it to bin/jruby during the build and that's how it gets shipped, even though the .bash file tags along.

@headius
Copy link
Member

headius commented Jan 21, 2022

Note we do have a jruby.sh in bin but it is very old and doesn't include any launcher features added in the last decade or so. The new sh launcher would be named jruby.sh once we merge and that would then be the only script-based launcher in bin (copied to bin/jruby for release like the bash launcher).

@headius headius marked this pull request as ready for review January 31, 2022 14:41
@headius headius added this to the JRuby 9.4.0.0 milestone Jan 31, 2022
@headius headius changed the base branch from jruby-9.3 to master January 31, 2022 14:42
@headius headius merged commit 0d76afb into jruby:master Jan 31, 2022
@headius
Copy link
Member

headius commented Jan 31, 2022

Thank you! This has been merged to master. I will do some cleanup to move this to jruby.sh, with jruby.bash just invoking it, and modify the build to copy from jruby.sh to bin/jruby.

We look forward to further improvements!

headius added a commit to headius/jruby that referenced this pull request Jan 31, 2022
* bin/jruby.bash sh script moved to bin/jruby.sh
* build copies bin/jruby.sh to bin/jruby if it is missing
* bin/jruby.bash warns of deprecation and launches bin/jruby.sh
* doco changes throughout

See jruby#7024
@mrnoname1000 mrnoname1000 deleted the sh_port_mk2 branch February 1, 2022 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants