From 521bb00247071e288ffd1d21a05346496cc77844 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 1 Nov 2016 13:18:53 -0400 Subject: [PATCH] export functionality --- bin/compile | 1 + bin/utils | 3 +++ 2 files changed, 4 insertions(+) diff --git a/bin/compile b/bin/compile index 43e0037..833d415 100755 --- a/bin/compile +++ b/bin/compile @@ -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`. diff --git a/bin/utils b/bin/utils index dd15c6e..a4dc20f 100755 --- a/bin/utils +++ b/bin/utils @@ -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