From: Nicolas Boisselier Date: Thu, 21 Dec 2017 04:43:01 +0000 (+0000) Subject: etc/repos.conf X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=4f1c9899af4d980045673d5b70f22ba008cae506;p=nb.git etc/repos.conf --- diff --git a/etc/profile b/etc/profile index 2532e38b..8eb8e457 100755 --- a/etc/profile +++ b/etc/profile @@ -27,6 +27,7 @@ if [ -n "$NB_LOOP" ]; then echo "WARN: NB_LOOP=$NB_LOOP: BASH_SOURCE=$BASH_SOURCE \$0=$0 | Won't load !" NB_LOOP=$(($NB_LOOP+1)) unset NB_LOOP + exit return 2>/dev/null || exit # if executable fi nb_debug "ENVS: BASH_SOURCE=$BASH_SOURCE \$0=$0" @@ -108,8 +109,8 @@ else for i in \ ${NB_ROOT}/etc/profile.d/envs \ ${NB_ROOT}/etc/profile.d/aliases \ - $(nb_repos_ls "etc/profile" "etc/profile.d/*.sh" | awk '$0 != "'${NB_ROOT}/etc/profile'"') \ - ;do + $(nb_repos_ls "etc/profile" "etc/profile.d/*.sh" | awk '!/^\/etc\// && $0 != "'${NB_ROOT}/etc/profile'"') \ + ; do nb_debug ". $i" [ -r "$i" -a -f "$i" ] && . "$i" done diff --git a/etc/profile.d/functions b/etc/profile.d/functions index f6f9001c..d7d42d71 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -40,6 +40,7 @@ nb_repos_ls() { local IFS=" " for d in `nb_repos`; do + [ "$d" = "/" ] && d="" for f in "$@"; do diff --git a/etc/profile.d/nb.sh b/etc/profile.d/nb.sh index f0e1e570..fb7aee79 100644 --- a/etc/profile.d/nb.sh +++ b/etc/profile.d/nb.sh @@ -1,4 +1,5 @@ export NB_DB=nb +#=SHELL_REPLACE sudo awk -F '}' '/CLEARTEXT/{print "export NB_AUTH=\"nb:"$2"\""}' /etc/ldap/nbdom.net/auth/nb.ldif export NB_AUTH="nb:0TXARcQUpjHZctoROA2X.weWSZKM5DGT" nb_repos_commit_push() { diff --git a/etc/repos.conf b/etc/repos.conf index a529b63b..d823e1f3 100644 --- a/etc/repos.conf +++ b/etc/repos.conf @@ -1,4 +1,5 @@ # NB 13.12.16: Default +/.nb-install /*/*/.nb-install /usr/local/src/*/.nb-install /home/*/*/.nb-install