aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST.in1
-rw-r--r--setup.py2
-rw-r--r--src/env12
3 files changed, 14 insertions, 1 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index e910148..243b009 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,4 @@
recursive-include man/ *
recursive-include config/ *
+include src/env
diff --git a/setup.py b/setup.py
index 556ffb3..f1e514a 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ setup (
('share/java-config/config', ["config/jdk-defaults.conf"]),
('/etc/java-config/', ["config/jdk.conf"]),
('/etc/env.d/',["config/20java-config"]),
- ('share/java-config/', ["config/symlink-tools"])
+ ('share/java-config/', ["config/symlink-tools", "src/env"])
]
)
diff --git a/src/env b/src/env
new file mode 100644
index 0000000..dc55d48
--- /dev/null
+++ b/src/env
@@ -0,0 +1,12 @@
+#!/bin/bash
+#Too be sourced
+
+if [[ -n ${GENTOO_VM} ]]; then
+ vmpath=/usr/share/java-config/vms/${GENTOO_VM}/
+elif [[ -h ${HOME}/.gentoo/user-vm ]]; then
+ vmpath=${HOME}/.gentoo/user-vm/
+else
+ vmpath=/usr/share/java-config/vms/system-vm/
+fi
+
+source ${vmpath}/env