X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.profile.d%2FPATH.bashrc;h=1a271aa46a80c305e316d8f618312baa99059487;hb=f9011e764d66e82897e8e2addee9e2aef7dbe634;hp=a7d44205bae2f8480e61479bf08141aaca185d02;hpb=104b025d33b8cf5f9d42bda3ac3d158eb7a07701;p=profile.git diff --git a/.profile.d/PATH.bashrc b/.profile.d/PATH.bashrc index a7d4420..1a271aa 100644 --- a/.profile.d/PATH.bashrc +++ b/.profile.d/PATH.bashrc @@ -30,10 +30,12 @@ function makepath() { # Read them. path= for dir in $(cat "$DIR/$dirs"); do + dir=$(eval echo "$dir") [ -d "$dir" ] || continue path="$path:$dir" done + unset dir # Sanitise path. path=${path#:} @@ -49,8 +51,8 @@ makepath PATH bindirs makepath C_INCLUDE_PATH incdirs copypath CPLUS_INCLUDE_PATH C_INCLUDE_PATH makepath LD_LIBRARY_PATH libdirs -copypath LD_RUN_PATH LD_LIBRARY_PATH +copypath LD_RUN_PATH PATH makepath MANPATH mandirs makepath PKG_CONFIG_PATH pkgdirs -unset sedscr makepath copypath +unset dirs copypath makepath newpath