File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,15 @@ BIN_PATH="/files/bin/java"
2525if [[ $# != " 0" && ${1} == " --reinstall" ]]; then
2626 rm -rf " ${INSTALL_DIR} "
2727 rm -f " ${BIN_PATH} "
28+ mapfile -t files_to_delete < <( find /files/bin -type l -exec bash -c '
29+ for link; do
30+ target=$(readlink "$link")
31+ if [[ "$target" == /files/opt/java/* ]]; then
32+ echo "$link"
33+ fi
34+ done
35+ ' _ {} +)
36+ rm -rf " ${files_to_delete[@]} "
2837fi
2938
3039hash -r
@@ -34,7 +43,7 @@ if command -v java; then
3443 exit 1
3544fi
3645
37- DOWNLOAD_URL=' https://download.java.net/openjdk/jdk8u41 /ri/openjdk-8u41-b04-linux-x64-14_jan_2020 .tar.gz'
46+ DOWNLOAD_URL=" https://download.java.net/openjdk/jdk25 /ri/openjdk-25+36_linux-x64_bin .tar.gz"
3847
3948if [[ -e ${INSTALL_DIR} ]]; then
4049 echo " The install directory (${INSTALL_DIR} ) already exists. This may mean java is already installed."
You can’t perform that action at this time.
0 commit comments