.bashrc.d/01detect_system: Use /etc/os-release
authorW. Trevor King <wking@tremily.us>
Wed, 11 Jul 2018 22:08:19 +0000 (15:08 -0700)
committerW. Trevor King <wking@tremily.us>
Wed, 11 Jul 2018 22:40:21 +0000 (15:40 -0700)
commitc7f9155f864dd3d5c13791720610d332e21eab4c
treed7bc328a1ad43b52c8ea0ab6e6b6f19f8f04c5c3
parentbf7f658d1d763fef3bce19cfb7823fa444037aef
.bashrc.d/01detect_system: Use /etc/os-release

The systemd folks kicked this off [1,2] and stopped supporting systems
without it in 2012-02-13 [3].  I haven't used Gentoo Prefix in a long
time, so I'm dropping that here.  All the other distros here have
long-since added an /etc/os-release.  And it means the script will now
autodetect rhel and others I had previously not supported as well.

I'd started off on this track for Arch in 7b8f3a76
(.bashrc.d/01detect_system: Use os-release to detect Arch,
2018-04-30).  This commit just moves the rest of these distros over.

Also switch from the terse '[' to the more obvious 'test', and shift
'then' (where I touch it) onto its own line.  No real reasons for
those; I just like that style more for some reason.

[1]: https://www.freedesktop.org/software/systemd/man/os-release.html
[2]: http://0pointer.de/blog/projects/os-release
[3]: https://lists.freedesktop.org/archives/systemd-devel/2012-February/004475.html
     Subject: [systemd-devel] [HEADS-UP] Support for /dev/os-release now kinda mandatory
     Date: Mon Feb 13 09:21:32 PST 2012
src/.bashrc.d/01detect_system
src/.bashrc.d/05histappend
src/.bashrc.d/15prompt_dircolors
src/.bashrc.d/20completion
src/.bashrc.d/20lesspipe
src/.bashrc.d/20screen
src/.bashrc.d/70title