From d82085dd14ed95ea80bbb58fca0762ba74ca79ef Mon Sep 17 00:00:00 2001 From: anoduck <11767-anoduck@users.noreply.gitgud.io> Date: Sat, 2 Mar 2024 16:14:48 -0500 Subject: [PATCH] Added OpenBSD OS information to allow compatibility --- setver.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setver.sh b/setver.sh index 415e13a..733bcb8 100755 --- a/setver.sh +++ b/setver.sh @@ -1169,6 +1169,11 @@ lookup_script_data() { os_version=$(sw_vers -productVersion) # 11.1 install_package="brew install" ;; + OpenBSD) + os_name=$(uname -s) + os_version=$(uname -r) + install_package="pkg_add -U" + ;; Linux | GNU*) if [[ $(command -v lsb_release) ]]; then # 'normal' Linux distributions @@ -1199,7 +1204,8 @@ lookup_script_data() { script_modified="??" [[ "$os_kernel" == "Linux" ]] && script_modified=$(stat -c %y "$script_install_path" 2>/dev/null | cut -c1-16) # generic linux [[ "$os_kernel" == "Darwin" ]] && script_modified=$(stat -f "%Sm" "$script_install_path" 2>/dev/null) # for MacOS - + [[ "$os_kernel" == "OpenBSD" ]] && script_modified=$(stat -f "%Sm" "$script_install_path" 2>/dev/null) # for MacOS + debug "$info_icon Last modif : $script_modified" debug "$info_icon Script ID : $script_lines lines / md5: $script_hash" debug "$info_icon Creation : $script_created"