From: Nicolas Boisselier Date: Mon, 18 Feb 2019 10:52:46 +0000 (+0000) Subject: etc/profile.d/sys.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=0cbe1021bb65659a8e619f0c4c83d2529e33c8e3;p=nb.git etc/profile.d/sys.sh --- diff --git a/bin/nb-update b/bin/nb-update index 40baa058..b907e7d5 100755 --- a/bin/nb-update +++ b/bin/nb-update @@ -117,6 +117,7 @@ for repo in $(nb_repos); do echo ( nb_api_post_host_info "${NAME}.$repo" "name:$name branch:$branch" + nb_api_post_host_info "${NAME}.$repo.git.status.exit_code" "$(git status --short &> /dev/null; echo $?)" # NB 06.02.18 key="repo.$name.$branch" # NB 06.02.18 nb_api_post_host_info "${key}.path" "$repo" # NB 06.02.18 nb_api_post_host_info "${key}.exit_code" "$ex" diff --git a/etc/profile.d/sys.sh b/etc/profile.d/sys.sh index 07b13dac..7ed71118 100644 --- a/etc/profile.d/sys.sh +++ b/etc/profile.d/sys.sh @@ -127,7 +127,10 @@ sys_os() { ( . /etc/os-release && echo $ID $VERSION ) + + elif wich sw_vers > /dev/null; then + echo $(sw_vers 2>/dev/null | awk -F':\t' '/^(ProductName|ProductVersion)/{print $2}' | head -2) && return + fi #[ -r /etc/debian_version ] && echo Debian $(cat /etc/debian_version) && return - echo $(sw_vers 2>/dev/null | awk -F':\t' '/^(ProductName|ProductVersion)/{print $2}' | head -2) && return }