From 94d6fae0f0a4af48752d5b38d3157d1e431c477c Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 26 Jan 2018 05:49:40 +0000 Subject: [PATCH] etc/profile.d/nb.sh --- etc/profile.d/nb.sh | 11 ++++------- etc/repos.conf | 9 +++++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/etc/profile.d/nb.sh b/etc/profile.d/nb.sh index 4ea3c97d..dbc2ea28 100644 --- a/etc/profile.d/nb.sh +++ b/etc/profile.d/nb.sh @@ -25,21 +25,18 @@ nb_repos_commit_push() { nb_repos_status() { shell_help "List repos git status" "$@" && return local status - local pwd=`pwd` +# NB 26.01.18 local pwd=`pwd` local i local ret=0 for i in $(nb_repos); do - cd "$i" || continue +# NB 26.01.18 cd "$i" || continue - status=$(git status --short "$i"|sed 's/^/ /') + status=$(cd "$i" && git status --short "$i"|sed 's/^/ /') || continue [ -n "$status" ] && status=$'\n'"$status" && ret=1 printf "%s %s\n" "$i" "$status" - #status=$(git status --short "$i"|sed "s,^,$i$(printf '\t'),") - #[ -n "$status" ] && ret=1 && echo "$status" - done - cd "$pwd" +# NB 26.01.18 cd "$pwd" return $ret } diff --git a/etc/repos.conf b/etc/repos.conf index 28207e78..a97c31a0 100644 --- a/etc/repos.conf +++ b/etc/repos.conf @@ -1,6 +1,11 @@ -# NB 13.12.16 -# Search repos patterns +# +# etc/repos.conf +# +# Find repos +# + /.nb-install +/{root,var/root}/.nb-install /{opt,usr,usr/local,etc,home,home/www,Users}/*/.nb-install -- 2.47.3