summaryrefslogtreecommitdiff
path: root/packages/scripts/resources/lib/activate.inc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packages/scripts/resources/lib/activate.inc.sh')
-rw-r--r--packages/scripts/resources/lib/activate.inc.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/scripts/resources/lib/activate.inc.sh b/packages/scripts/resources/lib/activate.inc.sh
index 79bed6b..b77b9fd 100644
--- a/packages/scripts/resources/lib/activate.inc.sh
+++ b/packages/scripts/resources/lib/activate.inc.sh
@@ -1,3 +1,17 @@
+# use to process /opt/activator entries
+__activator() {
+ for product in $*; do
+ if [ -d "/opt/activator/$product/env" ]; then
+ for env in /opt/activator/$product/env/*; do
+ name=$(basename "$env")
+ eval "export '$name'='$(cat $env)'"
+ done
+ fi
+ if [ -d "/opt/activator/$product/bin" ]; then
+ export PATH="/opt/activator/$product/bin":$PATH
+ fi
+ done
+}
# non-interactive activate
__activate_env() {