Skip to content

Instantly share code, notes, and snippets.

@sminnee
Last active September 19, 2017 05:52
Show Gist options
  • Save sminnee/a61d1d9485459ae33013d1e398dc9b25 to your computer and use it in GitHub Desktop.
Save sminnee/a61d1d9485459ae33013d1e398dc9b25 to your computer and use it in GitHub Desktop.
#!/bin/bash -eux
source $1
${@:2}

Usage

> ./herring.sh /path/to/env-vars ./framework/sake dev/crontask

Herring will load the environment variables from a env-var file and use those for running the sake command.

If you're already using a .env file this isn't necessary. But if you've configured env vars in Apache, you can use this approach.

You will still need to copy your env vars into a file that can be referenced in the first argument.

Thanks to stojg for the script!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment