mirror of
https://github.com/termux/termux-packages.git
synced 2025-01-19 11:02:16 +00:00
f494bfe0e9
And add .in suffix to indicate that we are sed'ing stuff in them. Also sed directly without first copying to destination dir.
26 lines
885 B
Bash
26 lines
885 B
Bash
#!@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"
|