Rather than doing this, could serverside just export the envs before calling. This script would reduce to almost nothing if we just set up some ENV vars for the deploy hook call from ruby.