From fc10ef848148c2719a439f932b27d9f2c94045c2 Mon Sep 17 00:00:00 2001 From: Andrejus Kostarevas Date: Fri, 13 Oct 2023 12:52:26 +0100 Subject: [PATCH] fix: os_info script osx support --- script/install.d/00-apt.sh | 2 -- script/install.d/00-os_info.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) delete mode 100755 script/install.d/00-apt.sh create mode 100755 script/install.d/00-os_info.sh diff --git a/script/install.d/00-apt.sh b/script/install.d/00-apt.sh deleted file mode 100755 index b46d373..0000000 --- a/script/install.d/00-apt.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -cat /etc/os-release diff --git a/script/install.d/00-os_info.sh b/script/install.d/00-os_info.sh new file mode 100755 index 0000000..57719f3 --- /dev/null +++ b/script/install.d/00-os_info.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# ----------------------------------------------------------------------------- +# Description: +# Print operating system information. +# + +if [[ "$OSTYPE" == "darwin"* ]]; then + sw_vers +elif [[ "$OSTYPE" == "linux-gnu"* ]]; then + lsb_release -a +fi