File: setup-java.sh

package info (click to toggle)
opensc 0.27.0~rc1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,848 kB
  • sloc: ansic: 184,915; xml: 6,535; sh: 2,766; makefile: 1,035; cpp: 382; lex: 92
file content (35 lines) | stat: -rwxr-xr-x 980 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash

set -ex -o xtrace

# github already selected the right java in https://github.com/actions/setup-java
if [ -z "$GITHUB_ACTIONS" ]; then
	# Select the right java
	sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
	sudo update-alternatives --get-selections | grep ^java
	export PATH="/usr/lib/jvm/java-8-openjdk-amd64/bin/:$PATH"
	export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
fi
env | grep -i JAVA

# VSmartcard
./.github/setup-vsmartcard.sh

# Javacard SDKs
if [ ! -d "oracle_javacard_sdks" ]; then
	git clone https://github.com/martinpaljak/oracle_javacard_sdks.git
fi
export JC_HOME=$PWD/oracle_javacard_sdks/jc222_kit
export JC_CLASSIC_HOME=$PWD/oracle_javacard_sdks/jc305u3_kit

# jCardSim
if [ ! -d "jcardsim" ]; then
	# https://github.com/licel/jcardsim/pull/174
	git clone https://github.com/Jakuje/jcardsim.git
fi
pushd jcardsim
env | grep -i JAVA
if [ ! -f target/jcardsim-3.0.5-SNAPSHOT.jar ]; then
	mvn initialize && mvn clean install
fi
popd