[packages/oracle-java8] add get-source.sh to assist downloading

glen glen at pld-linux.org
Sat May 16 00:05:50 CEST 2015


commit e20deafafc103fb50a1b196ffb262cafcc9d88bf
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 16 01:04:59 2015 +0300

    add get-source.sh to assist downloading

 get-source.sh | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
---
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..7fa3449
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Usage:
+# ./get-source.sh
+# Author: Elan Ruusamäe <glen at pld-linux.org>
+#
+# Idea based on omnibus-software jre package
+# https://github.com/opscode/omnibus-software/blob/master/config/software/jre.rb
+
+package=java8
+specfile=oracle-$package.spec
+
+# abort on errors
+set -e
+# work in package dir
+dir=$(dirname "$0")
+cd "$dir"
+
+refurl=http://www.oracle.com/technetwork/java/javase/downloads/
+licname="Oracle Binary Code License Agreement for Java SE"
+licurl=http://www.oracle.com/technetwork/java/javase/terms/license/
+cookie=accept-securebackup-cookie
+
+cat <<EOF
+
+You must accept the $licname
+to download this software.
+
+$licurl
+
+Press "ENTER" to Accept License Agreement
+Press Ctrl-C to Decline License Agreement
+
+EOF
+read license
+
+urls=$(builder -su *.spec | grep http://)
+for url in $urls; do
+	wget -c --header "Cookie: oraclelicense=$cookie; gpw_e24=$refurl" "$url"
+done
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/oracle-java8.git/commitdiff/e20deafafc103fb50a1b196ffb262cafcc9d88bf



More information about the pld-cvs-commit mailing list