I have a local development environment that relies heavily on system environment variables (it follows the Heroku 12-factor app model), and I currently set these using a shell script. The shell script also sets up git remotes, and activates the virtualenv environment, and I'd like, if possible, to move all this to a Fabric command (or series of commands), as we are using Fabric for a bunch of other stuff, and I'd like to retire the shell scripts.
Running local('export FOO=bar') doesn't work:
$ fab set_default_env_vars
Using fabfile '/home/hugo/Projects/test/fabfile.py'
[localhost] local: export FOO=bar
Done.
$ echo $FOO
$
Is this possible - and if so, how?