Created
May 22, 2013 09:47
-
-
Save matsadler/5626445 to your computer and use it in GitHub Desktop.
Execute a command/script with environment variables read from a .env file. Use like `setenv mycommand arg1 arg2 etc` .env file should look like:
VAR1=vlaue1
VAR2=value2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
dot_env=`cat .env` | |
env $dot_env $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment