Code Monkey home page Code Monkey logo

Comments (7)

tpimh avatar tpimh commented on July 22, 2024 2

In my opinion both toysh and the scripts should be improved. And both should be made POSIX compatible. Implementing support for bashisms in toysh may be a very time consuming task that will result in bloating. I think it is reasonable to only implement POSIX standard in toysh and check that all the scripts comply with this standard. I know that there are some bashisms used in those scripts, but I doubt that it would be easier to support them in toysh than rewrite to something simpler to implement. Doesn't seem counterproductive at all to me.

from toybox.

the-real-neil avatar the-real-neil commented on July 22, 2024 2

I'd like to voice my strong support for build/test scripts that require only a POSIX compliant shell. That toysh aspires to become bash-like isn't my personal preference, but this aspiration seems mostly divorced from what happens in the scripts that build and test this project.

from toybox.

technosaurus avatar technosaurus commented on July 22, 2024 2

The toybox shell is intended to be a reasonable bash replacement, so
rather than remove bashisms from our shell code the plan is to implement
support in toysh. That hasn't been done yet, but modifying toybox's shell
code to run in something other than toysh seems counterproductive.

If you actually look at the code, 99% is already sh compliant.
Aside from the shebang, the only thing that stands out as a gratuitous bashism is this line in runtest.sh:

[ "${i:0:1}" == "/" ] || i=$(which $i)`

and it could be replaced by

case "$i" in
/*);;
*) i=$(which $i);;
esac

I personally don't care that toybox requires a GPL licensed package to build, nor that bash is slower and slower with each version, nor that the only standard applicable to bash is Posix sh - with a bunch of unspecified addons that vary between versions, yet has no versioning standard for the shebang (Hell even perl and php do better). ...but even autotools can make their scripts Posix compliant.

from toybox.

landley avatar landley commented on July 22, 2024

from toybox.

landley avatar landley commented on July 22, 2024

from toybox.

FSMaxB avatar FSMaxB commented on July 22, 2024

I'm having trouble understanding the situation: Are those scripts required in order to build toybox, or at least toybox' shell implementation? If so, there is a hen and egg problem that could only be solved by using bash, if the bashism are not removed.

from toybox.

landley avatar landley commented on July 22, 2024

from toybox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.