[pkg-java] r5952 - in trunk/java-common: debian scripts
doko at alioth.debian.org
doko at alioth.debian.org
Wed Mar 5 17:41:54 UTC 2008
Author: doko
Date: 2008-03-05 17:41:52 +0000 (Wed, 05 Mar 2008)
New Revision: 5952
Modified:
trunk/java-common/debian/changelog
trunk/java-common/scripts/update-java-alternatives
trunk/java-common/scripts/update-java-alternatives.8
Log:
* update-java-alternatives: Add --jre-headless option.
Modified: trunk/java-common/debian/changelog
===================================================================
--- trunk/java-common/debian/changelog 2008-03-05 17:41:13 UTC (rev 5951)
+++ trunk/java-common/debian/changelog 2008-03-05 17:41:52 UTC (rev 5952)
@@ -7,6 +7,7 @@
a dependency on java-gcj-compat-dev even if the default jdk is
another than java-gcj-compat-dev. Discussion thread starting at
http://lists.debian.org/debian-java/2008/03/msg00007.html.
+ * update-java-alternatives: Add --jre-headless option.
-- Matthias Klose <doko at debian.org> Wed, 05 Mar 2008 18:28:56 +0100
Modified: trunk/java-common/scripts/update-java-alternatives
===================================================================
--- trunk/java-common/scripts/update-java-alternatives 2008-03-05 17:41:13 UTC (rev 5951)
+++ trunk/java-common/scripts/update-java-alternatives 2008-03-05 17:41:52 UTC (rev 5952)
@@ -8,7 +8,7 @@
{
rv=$1
cat >&2 <<-EOF
- usage: $prog [--jre] [--plugin] [ -t|--test|-v|--verbose]
+ usage: $prog [--jre-headless] [--jre] [--plugin] [ -t|--test|-v|--verbose]
-l|--list [<jname>]
-s|--set <jname>
-a|--auto
@@ -25,6 +25,8 @@
-a|--auto)
[ -z "$action" ] || usage 1
action=auto;;
+ -hl|--jre-headless)
+ hlonly=yes;;
-j|--jre)
jreonly=yes;;
--plugin)
@@ -53,6 +55,7 @@
-h|-?|--help)
usage 0;;
-*)
+ echo "X: $1"
usage 1;;
*)
break;;
@@ -60,13 +63,18 @@
shift
done
-[ "$#" -eq 0 ] || usage 1
-[ -n "$action" ] || usage 1
+#[ "$#" -eq 0 ] || usage 1
+#[ -n "$action" ] || usage 1
-which='^(jre|jdk|plugin|DUMMY) '
-[ -n "$jreonly$pluginonly" ] && which=${which/jdk|/}
-[ -n "$pluginonly" ] && [ -z "$jreonly" ] && which=${which/jre|/}
-[ -z "$pluginonly" ] && [ -n "$jreonly" ] && which=${which/plugin|/}
+which='^(hl|jre|jdk|plugin|DUMMY) '
+if [ -n "$hlonly$jreonly$pluginonly" ]; then
+ which='^('
+ [ -n "$hlonly" ] && which="${which}hl|"
+ [ -n "$jreonly" ] && [ -n "$hlonly" ] && which="${which}jre|"
+ [ -n "$jreonly" ] && [ -z "$hlonly" ] && which="${which}hl|jre|"
+ [ -n "$pluginonly" ] && which="${which}plugin|"
+ which="${which}DUMMY) "
+fi
top=/usr/lib/jvm
@@ -125,11 +133,11 @@
awk "/$which/ {print}" $jinfo | sort -u \
| \
while read type name location; do
- if [ $type = jdk -a -z "$jreonly$pluginonly" -a ! -f $location ]; then
+ if [ $type = jdk -a -z "$hlonly$jreonly$pluginonly" -a ! -f $location ]; then
echo >&2 "$prog: jdk alternative does not exist: $location"
continue
fi
- if [ $type = plugin -a -z "$jreonly" -a ! -f $location ]; then
+ if [ $type = plugin -a -z "$hlonly$jreonly" -a ! -f $location ]; then
echo >&2 "$prog: plugin alternative does not exist: $location"
continue
fi
Modified: trunk/java-common/scripts/update-java-alternatives.8
===================================================================
--- trunk/java-common/scripts/update-java-alternatives.8 2008-03-05 17:41:13 UTC (rev 5951)
+++ trunk/java-common/scripts/update-java-alternatives.8 2008-03-05 17:41:52 UTC (rev 5952)
@@ -29,7 +29,10 @@
Limit the actions to alternatives belong to a runtime environment,
not a development kit.
.TP
-\fB\-\-plugins\fR
+\fB\-\-jre\-headless\fR
+Limit the actions to alternatives belong to the headless part of a runtime environment.
+.TP
+\fB\-\-plugin\fR
Limit the actions to alternatives providing browser plugins.
.TP
\fB\-h|\-\-help\fR
More information about the pkg-java-commits
mailing list