cd ../ dirpath=`pwd` dir=`basename ${dirpath}` if [ "${dir}" = "edexOsgi" ]; then # we are in the distributed development environment cd ../ pwd else # all of the projects are in the workspace or one single directory echo ${dirpath} fi