#!/bin/bash if [[ -z $TARGET_ENV ]]; then echo "TARGET_ENV variable is not set." exit 1 fi export $(grep -v '^#' .env.$TARGET_ENV | xargs ) "$@"