]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/sys.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 18 Feb 2019 10:52:46 +0000 (10:52 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 18 Feb 2019 10:52:46 +0000 (10:52 +0000)
bin/nb-update
etc/profile.d/sys.sh

index 40baa058dcfd987304f106a65553881335c6c9d7..b907e7d5116464a3fd039212d4012cc8c077c485 100755 (executable)
@@ -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"
index 07b13dacdbf141f53aee4a453f73d36a66566cdc..7ed71118bdf6e604220b211903cf8e018ee78d57 100644 (file)
@@ -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
 }