#!/bin/bash

function setup_local_tools()
{
  local shopt_backup=$(shopt -p globstar)
  shopt -s globstar
  for bindir in ~/tools/**/bin;do
    if [[ "$PATH" != *$bindir* ]];then
      export PATH=$bindir:$PATH
    fi
  done
  eval "$shopt_backup" 2> /dev/null
}
setup_local_tools
unset setup_local_tools

Add path settings for local tools
[LocalTools] Add path settings for local tools

Local tools are assumed in ~tools/**/bin
"0" at the head of the script is for first execution among scripts in profile.d
directory.
