source: launchers/macosx/check_latest_java.sh @ c3b8317

Last change on this file since c3b8317 was ae0d420, checked in by meeh <meeh@…>, 23 months ago

Mac OSX Launcher:

  • Added script to check for latest java via xcode
  • Updated xcode project metadata files
  • Update dmg create script
  • Make xcode write version.h under build
  • Added template for version.h
  • Property mode set to 100755
File size: 1.0 KB
Line 
1#!/usr/bin/env bash
2DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3SRCROOT=${SRCROOT:-"$DIR"}
4
5echo "SRCROOT == $SRCROOT"
6
7java_version=11
8jsubv=28
9randhash="55eed80b163941c8885ad9298e6d786a"
10cookie_header="Cookie: oraclelicense=accept-securebackup-cookie"
11url="http://download.oracle.com/otn-pub/java/jdk/${java_version}+${jsubv}/${randhash}/jdk-${java_version}_osx-x64_bin.dmg"
12
13expected_etag="81ee08846975d4b8d46acf3b6eddf103:1531792451.574613"
14
15
16curl -I -H '${cookie_header}' -v -L $url 2> .tmp-java-check.log
17up_to_date="$(grep '${expected_etag}' .tmp-java-check.log | perl -pe 'chomp')"
18
19if [ ! -z "${up_to_date}"]; then
20    echo "NEW JAVA VERSION!"
21    cat .tmp-java-check.log
22    exit 1;
23fi
24
25echo "Java version check: Up to date!";
26
27rm -f .tmp-java-check.log
28
29header_content=$(cat <<EOF
30#ifndef __META_DL_JAVA_H__
31#define __META_DL_JAVA_H__
32
33#define JAVA_DOWNLOAD_URL "$url"
34
35#endif // __META_DL_JAVA_H__
36EOF
37)
38
39echo $header_content > $SRCROOT/meta_dl_java.h && echo "Wrote url to file $SRCROOT/meta_dl_java.h"
40
41
Note: See TracBrowser for help on using the repository browser.