export functionality

This commit is contained in:
2016-11-01 13:18:53 -04:00
parent 5cd4245412
commit 521bb00247
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -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`.
+3
View File
@@ -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