]> git.nbdom.net Git - nb.git/commitdiff
etc/profile
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 20 Nov 2020 22:51:39 +0000 (22:51 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 20 Nov 2020 22:51:39 +0000 (22:51 +0000)
etc/profile

index 6add54920f745b236d20981f20ff7daa56f1e88d..e4b812345b264fe26a0b8688cde2b11fe53bbe0a 100755 (executable)
@@ -68,27 +68,30 @@ elif [ "$KSH_VERSION" != "" ]; then
 #elif eval '[[ -n ${.sh.file} ]]' 2>/dev/null; then
        eval 'NB_ETC_DIR="$(dirname "${.sh.file}")"'
 
-elif [ -r /etc/profile.d/nb.sh ]; then
-       # Already installed
-# NB 18.02.19  NB_ETC_DIR=$(dirname $(grep '\. ' -m1 /etc/profile.d/nb.sh | cut -d'.' -f2 /etc/profile.d/nb.sh))
-       NB_ETC_DIR=$(dirname "$(awk -F'&& . ' '/ \. /{print $2;exit}' /etc/profile.d/nb.sh)")
-
 else
-       # Others
-       # We guess by looking for file !!
-       tmp=$PWD
-       for i in /*/*/etc/profile.d/nb.sh /*/*/*/etc/profile.d/nb.sh; do
-
-               cd "$(dirname "$i")"/.. 1>/dev/null 2>&1 || continue
-
-               # Look for this current file
-               [ -e profile ] && _nb_file_has_tag profile || continue
-
-               NB_ETC_DIR=$PWD #|| unset NB_ETC_DIR
-               break
-
-       done
-       cd "$tmp"
+# NB 20.11.20: Unsupported 
+       return 0
+# NB 20.11.20 elif [ -r /etc/profile.d/nb.sh ]; then
+# NB 20.11.20  # Already installed
+       NB_ETC_DIR=$(dirname $(grep '\. ' -m1 /etc/profile.d/nb.sh | cut -d'.' -f2 /etc/profile.d/nb.sh))
+# NB 20.11.20  NB_ETC_DIR=$(dirname "$(awk -F'&& . ' '/ \. /{print $2;exit}' /etc/profile.d/nb.sh)")
+# NB 20.11.20 
+# NB 20.11.20 else
+# NB 20.11.20  # Others
+# NB 20.11.20  # We guess by looking for file !!
+# NB 20.11.20  tmp=$PWD
+# NB 20.11.20  for i in /*/*/etc/profile.d/nb.sh /*/*/*/etc/profile.d/nb.sh; do
+# NB 20.11.20 
+# NB 20.11.20          cd "$(dirname "$i")"/.. 1>/dev/null 2>&1 || continue
+# NB 20.11.20 
+# NB 20.11.20          # Look for this current file
+# NB 20.11.20          [ -e profile ] && _nb_file_has_tag profile || continue
+# NB 20.11.20 
+# NB 20.11.20          NB_ETC_DIR=$PWD #|| unset NB_ETC_DIR
+# NB 20.11.20          break
+# NB 20.11.20 
+# NB 20.11.20  done
+# NB 20.11.20  cd "$tmp"
 
 fi