mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
export functionality
This commit is contained in:
@@ -106,6 +106,7 @@ BUILD_DIR=$APP_DIR
|
||||
|
||||
# Set up outputs under new context
|
||||
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
|
||||
EXPORT_PATH="$BIN_DIR/../export"
|
||||
GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh"
|
||||
|
||||
# We'll need to send these statics to other scripts we `source`.
|
||||
|
||||
@@ -39,11 +39,14 @@ puts-cmd() {
|
||||
# Usage: $ set-env key value
|
||||
set-env() {
|
||||
echo "export $1=$2" >> $PROFILE_PATH
|
||||
echo "export $1=$2" >> $EXPORT_PATH
|
||||
}
|
||||
|
||||
# Usage: $ set-default-env key value
|
||||
set-default-env() {
|
||||
echo "export $1=\${$1:-$2}" >> $PROFILE_PATH
|
||||
echo "export $1=\${$1:-$2}" >> $EXPORT_PATH
|
||||
|
||||
}
|
||||
|
||||
# Usage: $ un-set-env key
|
||||
|
||||
Reference in New Issue
Block a user