#!/bin/bash

MODULEBASE="/apps/phi/modules"
   MODULEPATH=""

    for dir in `ls $MODULEBASE`
    do
        # Exclude following directories
        if [[ ($dir == "all") ]]; then
            continue
        fi
        # In case that it's directory
        if [ -d $MODULEBASE/$dir ]; then
            if [ -z $MODULEPATH ]; then
                MODULEPATH="$MODULEBASE/$dir"
            else
                MODULEPATH="$MODULEPATH:$MODULEBASE/$dir"
            fi
        fi
    done

   export MODULEPATH

   ./modules.py
