11 lines
321 B
Bash
Executable file
11 lines
321 B
Bash
Executable file
#!/bin/bash
|
|
|
|
declare -r JAVADIR='/usr/lib/jvm/jdk-21.0.2'
|
|
declare -r PRIORITY=1
|
|
declare -r BINDIR='/usr/bin'
|
|
find "$JAVADIR" -perm 755 -type f | while read FP
|
|
do
|
|
FN=$(basename $FP)
|
|
echo "update-alternatives --install /usr/bin/$FN $FN $FP $PRIORITY"
|
|
update-alternatives --install /usr/bin/$FN $FN $FP $PRIORITY
|
|
done
|