openjdk: Add some packaging treats

Add to the package:
* bin/java-config: When invoked with option -H it prints the java home
  directory.
* data/profile.d/openjdk.sh: It is automatically sourced by
  /etc/profile and sets JAVA_HOME.
This commit is contained in:
Ingo Weinhold
2013-12-06 02:35:34 +01:00
parent cffe13f951
commit 4de4abc407
2 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
#!/bin/sh
javaHome="%JAVA_HOME%"
printUsage()
{
cat <<EOF
Usage: java-config <option>
Print java configuration values.
Options:
-h, --help - Print this help text.
-H - Print Java home path.
EOF
}
if [ $# -ne 1 ]; then
printUsage >&2
exit 1
fi
case "$1" in
-H)
echo $javaHome
;;
-h|--help)
printUsage
exit 0
;;
*)
printUsage >&2
exit 1
;;
esac