Skip to content

Commit

Permalink
[scripts] adapt lejos jdk archive to its update system
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubVanek committed Mar 28, 2018
1 parent f52254c commit b6bb975
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 0 additions & 2 deletions scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ if [ "$JDKVER" -eq "9" ]; then
HOSTJDK="$BUILDDIR/jdk-9.0.4"
HOSTJDK_FILE="$BUILDDIR/openjdk-9.0.4_linux-x64_bin.tar.gz"
HOSTJDK_URL="https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz"
LEJOS_NAME=openjdk9-jri

# OpenJDK 10
elif [ "$JDKVER" -eq "10" ]; then
Expand All @@ -70,7 +69,6 @@ elif [ "$JDKVER" -eq "10" ]; then
HOSTJDK="$BUILDDIR/jdk-10"
HOSTJDK_FILE="$BUILDDIR/openjdk-10_linux-x64_bin.tar.gz"
HOSTJDK_URL="https://download.java.net/java/GA/jdk10/10/binaries/openjdk-10_linux-x64_bin.tar.gz"
LEJOS_NAME=openjdk10-jri

# invalid or unset version
else
Expand Down
10 changes: 9 additions & 1 deletion scripts/lejos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ cd "$(dirname ${BASH_SOURCE[0]})"
source ../config.sh
SCRIPTDIR="$SCRIPTDIR/.."

pushd "$JDKDIR" >/dev/null
JAVA_VERSION="$(hg log -r "." --template "{latesttag}\n" | sed 's/jdk-//')"
popd
LEJOS_NAME="ejre-openjdk-$JAVA_VERSION"

# temp directory
rm -rf "$LEJOSDIR"
mkdir -p "$LEJOSDIR/deb" "$LEJOSDIR/root"

echo "copy in JRI"
cp -rf --preserve=links "$IMAGEDIR/jri-ev3" "$LEJOSDIR/jri"

echo "create version file ($JAVA_VERSION)"
echo "$JAVA_VERSION" >"$LEJOSDIR/jri/jrever"

echo "download DEB packages"
cd "$LEJOSDIR/deb"
apt-get download `cat "$SCRIPTDIR/lejos/pkgs.txt"`
Expand Down Expand Up @@ -42,4 +50,4 @@ rm -rf "$LEJOSDIR/deb"
echo "create archive"
cd "$LEJOSDIR"
mv "jri" "$LEJOS_NAME"
tar -cf - "$LEJOS_NAME" | pigz -9 > "$BUILDDIR/lejos-$LEJOS_NAME.tar.gz"
tar -cf - "$LEJOS_NAME" | pigz -9 > "$BUILDDIR/$LEJOS_NAME.tar.gz"

0 comments on commit b6bb975

Please sign in to comment.