for program in \$*; do
if [[ -f "\$program_base/\$program" ]]; then
update-alternatives \\
- --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority \\
+ --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" ${priority_override:-$j2se_priority} \\
--slave "/usr/share/man/man1/\$program.1.gz" "\$program.1.gz" "$jvm_base$j2se_name/man/man1/\$program.1.gz"
fi
done
shift
for program in \$*; do
if [[ -f "\$program_base/\$program" ]]; then
- update-alternatives --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority
+ update-alternatives --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" ${priority_override:-$j2se_priority}
fi
done
}
local plugin="\$4"
[ -d "\$link_path" ] || install -d -m 755 "\$link_path"
if [[ -f "\$plugin" ]]; then
- update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" $j2se_priority
+ update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" ${priority_override:-$j2se_priority}
fi
}
EOF
oracle_j2sdk_jinfo() {
cat << EOF
name=$j2se_name
-priority=$j2se_priority
+priority=${priority_override:-$j2se_priority}
section=main
EOF
jinfos "hl" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_hl
oracle_j2re_jinfo() {
cat << EOF
name=$j2se_name
-priority=$j2se_priority
+priority=${priority_override:-$j2se_priority}
section=main
EOF
jinfos "hl" $jvm_base$j2se_name/bin/ $oracle_jre_bin_hl
oracle_server_j2re_jinfo() {
cat << EOF
name=$j2se_name
-priority=$j2se_priority
+priority=${priority_override:-$j2se_priority}
section=main
EOF
jinfos "hl" $jvm_base$j2se_name/bin/ $oracle_jre_bin_hl
--full-name NAME full name used in the maintainer field of the package
--email EMAIL email address used in the maintainer field of the package
- --distribution Define the distribution to use in the changelog
+ --distribution DIST Define the distribution to use in the changelog
+ --priority PRIORITY Override default package priority
--changes create a .changes file
--revision add debian revision
--source build a source package instead of a binary deb package
[ $# -le 1 ] && missing_argument "$1"
shift
distribution="$1"
+ elif [[ "x$1" == x--priority ]]; then
+ [ $# -le 1 ] && missing_argument "$1"
+ shift
+ priority_override="$1"
elif [[ "x$1" == x--revision ]]; then
[ $# -le 1 ] && missing_argument "$1"
shift
.B --distribution \fIDISTRIBUTION\fR
distribution to use in the debian changelog for the resulting package
.TP
+.B --priority \fIPRIORITY\fR
+numeric priority for use by \fBupdate-alternatives\fP. This overrides the default
+priority, which is intentionally lower than that of the Debian-provided OpenJDK
+packages. Only use this option if the generated package should be considered higher
+priority by \fBupdate-alternatives\fP.
+.TP
.B --changes
create a .changes file
.TP