Add os-release module

Prints your distro's name
This commit is contained in:
Baitinq 2021-10-21 13:41:03 +01:00 committed by GitHub
parent ae937dfd0f
commit e5b929d981
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

14
modules/os-release Normal file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# Prints out your OS name
PREFIX=' '
get_os_name()
{
OS=$(cat /etc/os-release | head -n 1 | sed 's/NAME=//g')
echo "$PREFIX$OS"
}
get_os_name