Skip to content

Instantly share code, notes, and snippets.

@laraconda
Created December 29, 2016 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laraconda/928b5e04072eb8cd9d8a284f24bce7d4 to your computer and use it in GitHub Desktop.
Save laraconda/928b5e04072eb8cd9d8a284f24bce7d4 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Set env vars from a file in the same dir as this script.
for ENVV in `cat $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/[env_vars_raw]`
do
export $ENVV
done
@laraconda
Copy link
Author

laraconda commented Dec 30, 2016

Fuck. This script does not work when you call it from crontab.
Just change the path to your [env_vars_raw]. Make it explicit.

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