[java-policy] 60/198: New JVM selection scripts.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed Sep 23 07:49:30 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository java-policy.
commit ee9f96d7a52ddeb8e4cdd462adb091f13ec3e4e6
Author: Jerry Haltom <wasabi at larvalstage.net>
Date: Thu Jul 7 21:39:46 2005 +0000
New JVM selection scripts.
---
debian/changelog | 8 ++++++++
debian/java-common.dirs | 1 +
debian/rules | 1 +
share/java-common.sh | 36 ++++++++++++++++++++++++++++++++++++
share/jvm-find.sh | 5 +++++
5 files changed, 51 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index a61d226..c427846 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+java-common (0.24) unstable; urgency=low
+
+ * Added new JVM launcher support scripts and settings file. These support
+ machine wide, per-user, per-program JVM selection. They should be sourced
+ from a package's wrapper script to determine JAVA_HOME.
+
+ -- Jerry Haltom <wasabi at larvalstage.net> Wed, 6 Jul 2005 17:44:45 -0500
+
java-common (0.23) unstable; urgency=low
* Updated the Debian Java FAQ (closes: #156547, #252219), thanks to
diff --git a/debian/java-common.dirs b/debian/java-common.dirs
index 13c9f03..bf7c2a3 100644
--- a/debian/java-common.dirs
+++ b/debian/java-common.dirs
@@ -1 +1,2 @@
+usr/share/java-common
usr/share/java
diff --git a/debian/rules b/debian/rules
index f425f88..f195b97 100755
--- a/debian/rules
+++ b/debian/rules
@@ -62,6 +62,7 @@ binary-indep: build install
# dh_installcron -i
dh_installman -i
# dh_installinfo -i
+ dh_install -i
# dh_undocumented -i
dh_installchangelogs -i
dh_link -i
diff --git a/share/java-common.sh b/share/java-common.sh
new file mode 100644
index 0000000..c0db858
--- /dev/null
+++ b/share/java-common.sh
@@ -0,0 +1,36 @@
+function jvm_scan_file() {
+ file="$1"
+
+ grep -v '#' "$file" | while read jvm; do
+ if [ -n "$jvm" -a -x "$jvm/bin/java" ]; then
+ echo -n $jvm
+ return
+ fi
+ done
+}
+
+function jvm_find() {
+ local jvm
+
+ if [ -n "$JAVA_HOME" ]; then
+ jvm="$JAVA_HOME"
+ fi
+
+ for file in \
+ "$HOME/.jvm.d/$1" \
+ "$HOME/.jvm" \
+ "/etc/jvm.d/$1" \
+ "/etc/jvm"; do \
+ if [ -z "$jvm" ]; then
+ if [ -r "$file" ]; then
+ jvm="$(jvm_scan_file "$file")"
+ fi
+ fi
+ done
+
+ echo -n "$jvm"
+}
+
+function jvm_config() {
+ echo JAVA_HOME="$(jvm_find "$1")"
+}
diff --git a/share/jvm-find.sh b/share/jvm-find.sh
new file mode 100755
index 0000000..653e2e7
--- /dev/null
+++ b/share/jvm-find.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+. $(dirname $0)/java-common.sh
+
+jvm_config "$@"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/java-policy.git
More information about the pkg-java-commits
mailing list