]> git.nbdom.net Git - nb.git/commitdiff
/opt/nb/etc/profile
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 18 Aug 2019 05:11:58 +0000 (06:11 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 18 Aug 2019 05:11:58 +0000 (06:11 +0100)
etc/profile
etc/profile.d/sys.sh

index 993ebc463533961d9eb3f2509a0ef77c86dd267b..c37391d3f575d09cb334d0923c85cdcba41de322 100755 (executable)
@@ -124,9 +124,8 @@ nb_debug "NB_ROOT=$NB_ROOT"
 # NB 09.01.18       $(true || nb_repos_ls "etc/profile" "etc/profile.d/*.sh" | awk '!/^\/etc\// && $0 != "'${NB_ROOT}/etc/profile'"') \
 if [ -n "$NB_ROOT" ]; then
 
-       alias which=which_cache
+       #alias which=which_cache
        nb_debug "PATH=$PATH"
-       #PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
        for i in \
                ${NB_ROOT}/etc/profile.d/envs \
                ${NB_ROOT}/etc/profile.d/aliases \
@@ -140,7 +139,7 @@ if [ -n "$NB_ROOT" ]; then
                nb_debug ". $i"
                [ -r "$i" -a -f "$i" ] && . "$i"
        done
-       unalias which
+       #unalias which
 
 fi
 
index 73028048aa2b8fe0b48de31c309a134fb7a01cec..b565ac9fa304535e2a6fb2bd560c815baa25f400 100644 (file)
@@ -153,6 +153,9 @@ sys_os() {
                        . /etc/os-release && echo $ID $VERSION
                )
 
+       elif which lsb_release > /dev/null; then
+               lsb_release --short -d
+
        elif which sw_vers > /dev/null; then
                echo $(sw_vers 2>/dev/null | awk -F':\t' '/^(ProductName|ProductVersion)/{print $2}' | head -2) && return