|
|
|
|
|
by LukeShu
2671 days ago
|
|
Whenever someone says "most people don't write large Bash scripts", I have to chime in and say that I would consider most GNU/Linux distros to be giant piles of shell scripts. A year or two ago, Arch Linux migrated the tests for dbscripts (the server-side of how package releases happen) from shUnit2 to BATS. https://git.archlinux.org/dbscripts.git/ |
|
Yes! That was one of the primary motivations for my Oil project [1]. I was building containers from scratch with shell scripts (in 2012 or so, pre-Docker), and I was horrified when I discovered how Debian actually works.
Why Create a New Unix Shell? http://www.oilshell.org/blog/2018/01/28.html
And of course it's not just Debian. Red Hat, Fedora, Alpine, etc. are all big packages of shell scripts, often mixed with other ad hoc macro processing or Makefiles. Alpine does this funny hack where their metadata is in APKBUILD shell scripts, which is limiting when you want to read metadata without executing shell.
I also point out in that post that Kubernetes is pretty new (2014) and it has 48,000 lines of shell in its repo.
That's true of most cloud infrastructure. If you deal with Heroku, OpenStack, Cloud Foundry, etc. there is a ton of shell all over the place. With buildpacks, Travis CI, etc.
And that's obviously not because the authors of those projects don't know what they're doing. Shell is still the best tool for that job (bringing up Unix systems), despite all its flaws.
The world now runs on clusters of Unix machines, and in turn big piles of shell scripts :)
-----
New release here if anyone wants to help me test: OSH 0.6.pre15 http://www.oilshell.org/blog/2019/02/18.html
Caveat: it's still too slow; I'm mainly looking for people to help test it.
Running bats tests with it would be great. I don't know how bats works with the @test annotation? That doesn't look like valid shell syntax.
OSH also opens a lot of new opportunities for people interested in testing / static analysis and shell.
There was some discussion here, even related to bats, but I'm not sure where it went: https://github.com/oilshell/oil/issues/200
[1] The other being how hard it is to write an autocompletion script!