metacall / core

MetaCall: The ultimate polyglot programming experience.
https://metacall.io
Apache License 2.0
1.55k stars 160 forks source link

Metacall runtime.sh - small enhancement #495

Closed onass1 closed 5 months ago

onass1 commented 6 months ago

This is small enhancement if it could benefit you, I was reading Metacall-runtime.sh file and noticed this small issue, I know it may be not important but it may help. All systemd distributions have /etc/os-release even if they are non-systemd like void or slackware, so we can benefit from this advantage and use only one if to detect the distro name and version we don't need to use if and else if as all distribution now support /etc/os-release.

Slackware can be accessed by: /etc/os-release or /etc/slackware-version but we will stick to /etc/os-release to make it somehow generic. Void uses /etc/os-release but distro_name and version has quotes embedded so we use tr -d '"' to remove quotes for that reason.

viferga commented 5 months ago

I can't see the modifications you did, the standard method for sending new code to this repository is by making new Pull Requests.

In any case, that part is not the only that should be modified if we support other Linux distros, we should add full support to the package manager and dependencies that are all around the file.

I am going to close this issue because we won't be adding support for those yet. Our next objective is to fully support alpine (which is partially supported now due to musl).