Sime makelike wrapper scripts support

Eli Schwartz eschwartz at archlinux.org
Mon Jan 13 15:27:41 UTC 2020


On 1/13/20 10:03 AM, Boris Kotov wrote:
> 
> Sure, you can write shell scripts, functions, case-statements, but with
> `mim` you eliminate unnecessary noise.

You can eliminate the same noise by installing GNU make, which is a
224kb package on x86_64 alpine.

> For example in the script above there are 5 Lines of 11 which do not
> provide any value, but noise.

The whitespace doesn't provide any value either, depending on which
biased analysis you'd like to make. Would this example be less wasteful
to you?

```
#!/bin/sh -e

hello () { echo hello; }
build() { docker build -t image .; }
push() { docker push -t image; }

"$@"
```

> (like "$@" from the bottom of your script,
> https://stackoverflow.com/questions/9994295/what-does-mean-in-a-shell-script
> <https://stackoverflow.com/questions/9994295/what-does-mean-in-a-shell-script>
> (174k views))
> 
> So, the USP here is that mim provides a very clear and intuitive
> interface for non-experienced shell users
> And for complex stuff, use mim as a wrapper and write shell scripts
> underneath.

Another way of looking at it would be for complex stuff, you'd obscure
the meaning under layers of incomprehension.

> I really would love to have it in busybox/alpine and in their
> descendants, if you have common tasks to use in your containers, just
> COPY a Mimfile in there.

Couldn't you also COPY mim.sh? Why add 500 bytes to *everyone*'s
busybox, in order to save 224kb in one person's docker container? Why
reserve the namespace "mim" so that no one else can ever use it on
alpine (you cannot exactly "apk del" a busybox builtin, and just
installing bash or zsh seems to be rather missing the point).

Why must every single small script that some people consider useful, be
hardcoded into the busybox binary?

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20200113/4cc6e69b/attachment.asc>


More information about the busybox mailing list