File: can-install-multiple-jdks

package info (click to toggle)
ca-certificates-java 20240118
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: java: 309; sh: 255; xml: 30; makefile: 24
file content (18 lines) | stat: -rw-r--r-- 395 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

set -e

output=`mktemp`

jdks=$(apt-cache -n search java-sdk| awk '$1 ~ /-.*-jdk$/ {print $1}')

# WHEN multiple JDKs are installed
echo "Installing $jdks ..."
apt-get install -y $jdks | tee ${output}

# THEN installation is successful
if [[ $(grep -L "Adding debian:Amazon_Root_CA_1.pem" ${output}) ]]; then
    echo "Certificates were not imported !!!"
    exit 255
fi
rm $output