dot

packages and services management
Log | Files | Refs | README

commit 02191dda2f608bb795583ee149d22e5d9961aa94
parent 022c5b05ae1e0b5c90607b77e03ce30d7a5f0fcc
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Fri, 28 Jul 2017 19:57:02 +0200

*/bin,profile: add */bin directories to $PATH

profile will look for all */bin subdirectories and add them
all to the $PATH.

It will look in $ETC/*/bin (mostly shell scripts) and in $OPT/*/bin
(binaries, installed programs).

Diffstat:
Mprofile | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/profile b/profile @@ -6,12 +6,15 @@ export VAR="$HOME/var" export ROOT="$HOME/.local" -export PATH="$ROOT/bin:$ETC/bin:$PATH" export MANPATH="$ROOT/man:$MANPATH" export C_INCLUDE_PATH="$ROOT/include" export LIBRARY_PATH="$ROOT/.local/lib" export LD_LIBRARY_PATH="$ROOT/lib:$LD_LIBRARY_PATH" +for bin in "$ETC"/*/bin "$ETC/bin" "$OPT"/*/bin +do [ -d "$bin" ] && export PATH="$bin:$PATH" +done + for profile in "$ETC"/*/profile do [ -f "$ETC"/*/profile ] && . "$profile" done