Changeset 55


Ignore:
Timestamp:
Dec 18, 2011, 10:57:37 PM (9 years ago)
Author:
g7moreau
Message:
  • More generic avail implementation!
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bundle/bundle.bash

    r54 r55  
    11function bundle {
    22   local ext=$(basename ${SHELL})
    3    local folder="/etc/bundle/bundle.d ${HOME}/.config/loadenv"
     3   local folder="${HOME}/.config/bundle/bundle.d /etc/bundle/bundle.d"
    44
    55   case "$1" in
    66      avail)
    7           [ -d "/etc/bundle/bundle.d" ]   && ( cd "/etc/loadenv.d" ; find . -type f -a -name "*.${ext}" | sed -e "s/.\///; s/\.${ext}\$/" )
    8           [ -d "${HOME}/.config/loadenv" ] && ( cd "${HOME}/.config/loadenv" ; find . -type f -a -name "*.${ext}" | sed -e "s/.\///; s/\.${ext}\$//" )
     7         for d in ${folder}
     8         do
     9            if [ -d "$d" ]
     10            then
     11               echo "   --- folder $d"
     12               ( cd "$d" ; find . -type f -a -name "*.${ext}" | sed -e "s/.\///; s/\.${ext}\$//" )
     13            fi
     14         done
    915         ;;
    1016
Note: See TracChangeset for help on using the changeset viewer.