-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
92 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!@TERMUX_PREFIX@/bin/sh | ||
|
||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then | ||
if [ -x "@TERMUX_PREFIX@/bin/update-alternatives" ]; then | ||
update-alternatives --install @TERMUX_PREFIX@/etc/profile.d/java.sh java-profile @TERMUX_PREFIX@/lib/jvm/java-17-openjdk 40 | ||
for tool in @binaries@; do | ||
update-alternatives --install \ | ||
@TERMUX_PREFIX@/bin/$tool $tool \ | ||
@TERMUX_PREFIX@/lib/jvm/java-17-openjdk/bin/$tool 40 | ||
done | ||
|
||
for manpage in @manpages@; do | ||
update-alternatives --install \ | ||
@TERMUX_PREFIX@/share/man/man1/$manpage $manpage \ | ||
@TERMUX_PREFIX@/lib/jvm/java-17-openjdk/man/man1/$manpage 60 | ||
done | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!@TERMUX_PREFIX@/bin/sh | ||
|
||
if [ "$1" != "upgrade" ]; then | ||
if [ -x "@TERMUX_PREFIX@/bin/update-alternatives" ]; then | ||
update-alternatives --remove java-profile @TERMUX_PREFIX@/etc/profile.d/java.sh | ||
for tool in @binaries@; do | ||
update-alternatives --remove $tool @TERMUX_PREFIX@/bin/$tool | ||
done | ||
|
||
for manpage in @manpages@; do | ||
update-alternatives --remove $manpage @TERMUX_PREFIX@/share/man/man1/$manpage | ||
done | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!@TERMUX_PREFIX@/bin/sh | ||
|
||
if [ -f @TERMUX_PREFIX@/etc/profile.d/java.sh ]; then | ||
raelpath=$(readlink @TERMUX_PREFIX@/etc/profile.d/java.sh) | ||
sp_raelpath=(${raelpath//// }) | ||
if [ "${sp_raelpath[-4]}" != "java-17-openjdk" ]; then | ||
echo "==> Attention, the commands will be reconfigured to openjdk-17. If you want to stay on \"${sp_raelpath[-4]}\" then reinstall the package" | ||
fi | ||
fi | ||
|
||
echo "==> Setting up the openjdk-17 package..." | ||
|
||
for i in @binaries@; do | ||
ln -sfr "@TERMUX_PREFIX@/lib/jvm/java-17-openjdk/bin/${i}" "@TERMUX_PREFIX@/bin/${i}" | ||
done | ||
|
||
mkdir -p @TERMUX_PREFIX@/share/man/man1 | ||
for i in @manpages@; do | ||
ln -sfr "@TERMUX_PREFIX@/lib/jvm/java-17-openjdk/man/man1/${i}" "@TERMUX_PREFIX@/share/man/man1/${i}" | ||
done | ||
|
||
mkdir -p @TERMUX_PREFIX@/etc/profile.d | ||
ln -sfr @TERMUX_PREFIX@/lib/jvm/java-17-openjdk/etc/profile.d/java.sh @TERMUX_PREFIX@/etc/profile.d/java.sh | ||
|
||
echo "==> Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!@TERMUX_PREFIX@/bin/sh | ||
|
||
if [ -f @TERMUX_PREFIX@/etc/profile.d/java.sh ]; then | ||
raelpath=$(readlink @TERMUX_PREFIX@/etc/profile.d/java.sh) | ||
sp_raelpath=(${raelpath//// }) | ||
if [ "${sp_raelpath[-4]}" != "java-17-openjdk" ]; then | ||
return | ||
fi | ||
fi | ||
|
||
for i in @binaries@; do | ||
rm "@TERMUX_PREFIX@/bin/${i}" | ||
done | ||
|
||
for i in @manpages@; do | ||
rm "@TERMUX_PREFIX@/share/man/man1/${i}" | ||
done | ||
|
||
rm @TERMUX_PREFIX@/etc/profile.d/java.sh |