Commit Graph
4 Commits
Author SHA1 Message Date
Benjamin Kästner 3ac03293a9 os: Remove fall-back on function argument
As `release-file` is used only once in the function, we don't need to
set its default value via `setq' if it is `nil`.
2021-05-01 23:46:56 +02:00
Benjamin Kästner c432776b95 os: Check for programs/files instead of ignoring errors 2021-05-01 17:48:15 +02:00
Benjamin Kästner 9ccd234a3d os: search in temporary buffer instead of string
Instead of filtering all lines for `PRETTY_LINE` and then replace the
line with only the quoted contents, `re-serach-forward` (or -backward)
provide a `match-*` interface. That way we can work solely inside the
buffer and return only the matching string part.
2021-05-01 12:47:29 +02:00
Benjamin Kästner f4734014ac Provide more operating system identification methods
While `/etc/os-release` is usually available on Linux systems, it
might be missing on distribution that don't follow that convention.

For those distributions, the commands `hostnamectl` (from systemd) and
`lsb_release` might provide an alternative. Unfortunately, those
commands might also be missing as well as `/etc/os-release`, so the
newly introduced `eshell-info-banner--get-os-information` function
falls back to the string "Unknown" (and should never fail).

Fixes #1.
2021-05-01 12:46:25 +02:00