aboutsummaryrefslogtreecommitdiffstats
path: root/shlib/os.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shlib/os.sh')
-rw-r--r--shlib/os.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/shlib/os.sh b/shlib/os.sh
index 9c3b62c..4fb7989 100644
--- a/shlib/os.sh
+++ b/shlib/os.sh
@@ -13,3 +13,12 @@ os_is_macos() {
os_is_openbsd() {
[ "$(os_print)" = "OpenBSD" ]
}
+
+os_is_linux() {
+ [ "$(os_print)" = "Linux" ]
+}
+
+os_is_linux_debian() {
+ _linux_debian_id=$(. /etc/os-release && echo $ID)
+ [ os_is_linux ] && [ "$_linux_debian_id" = "debian" ]
+}