Skip to content

Instantly share code, notes, and snippets.

@maddievision
Created May 18, 2018 20:03
Show Gist options
  • Save maddievision/97697e34a5dfaf3e4712c276087c74b9 to your computer and use it in GitHub Desktop.
Save maddievision/97697e34a5dfaf3e4712c276087c74b9 to your computer and use it in GitHub Desktop.
bash dotenv
#!/bin/sh
cd $(dirname $(realpath $0))
if [ -f .env ]; then
export $(cat ../.env | grep -v ^# | xargs)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment