mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
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:
37
dev-lang/openjdk/sources/java-config.in
Normal file
37
dev-lang/openjdk/sources/java-config.in
Normal 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
|
||||
Reference in New Issue
Block a user