#!/bin/bash ORIGDIR="$(pwd)" if [[ -n "$3" ]]; then if [[ -d "$3" ]]; then cd "$3" > /dev/null fi fi if [ -f $1 ]; then source $1 &> /dev/null echo '-- ENVIRONMENT "'$2'" --' env fi cd $ORIGDIR