Comments (7)
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.
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.
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.
from toybox.
from toybox.
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.
from toybox.
Related Issues (20)
- install does not handle the creation of "drwxr-s---" correctly HOT 6
- xsendfile error checking
- add a useful common ip HOT 3
- Request diff -I/--ignore-matching-lines
- [Documentation] Differences to busybox? HOT 3
- [Feature request] Could a static-option be added to the menu interface? HOT 5
- [Documentation / Question] Can toybox be combined with e. g. mruby? HOT 9
- building a rootfs without a kernel HOT 10
- Most scripts use /bin/bash, which not all systems have. Use /usr/bin/env instead? HOT 11
- [Q] Can `bash` compatibility in toysh be turned off during build time and during run time? HOT 2
- building 0.8.11 with ssl and tls is broken HOT 15
- When running shell scripts, the process coredump.
- POSIX deviation: test arithmetic operands must support decimal only HOT 12
- find -size <number-without-suffix> not POSIX HOT 7
- Can you include oksh? HOT 1
- On incremental builds' reproducibility HOT 1
- ASAN failures in various file processing commands HOT 1
- [Feature Suggestion] progress meter (pv subcommand) HOT 5
- [FR] envsubst HOT 4
- getty: does not display issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toybox.