]> git.pld-linux.org Git - packages/oracle-instantclient.git/commitdiff
zip downloader
authorElan Ruusamäe <glen@delfi.ee>
Thu, 8 May 2014 08:13:23 +0000 (11:13 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 8 May 2014 08:14:21 +0000 (11:14 +0300)
does not work, as additionally requires you to sign in

get-source.sh [new file with mode: 0755]

diff --git a/get-source.sh b/get-source.sh
new file mode 100755 (executable)
index 0000000..6bc8569
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+# Usage:
+# ./get-source.sh
+# Author: Elan Ruusamäe <glen@pld-linux.org>
+#
+# Idea based on omnibus-software jre package
+# https://github.com/opscode/omnibus-software/blob/master/config/software/jre.rb
+
+package=instantclient
+specfile=oracle-$package.spec
+arch=$1
+
+# abort on errors
+set -e
+# work in package dir
+dir=$(dirname "$0")
+cd "$dir"
+
+arch=${1:-$(rpm -E %_arch)}
+
+case "$arch" in
+i686)
+       refurl=http://www.oracle.com/technetwork/topics/linuxsoft-082809.html
+       cookie=accept-ic_linux32-cookie
+       ;;
+x86_64)
+       refurl=http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
+       cookie=accept-ic_linuxx8664-cookie
+       ;;
+*)
+       echo >&2 "arch not recognized"
+       exit 1
+       ;;
+esac
+
+cat <<EOF
+
+You must accept the OTN Development and Distribution License Agreement for
+Instant Client to download this software.
+
+http://www.oracle.com/technetwork/licenses/instant-client-lic-152016.html
+
+Press "ENTER" to Accept License Agreement
+Press Ctrl-C to Decline License Agreement
+
+EOF
+read license
+
+urls=$(builder -su *.spec --target $arch | grep http://)
+for url in $urls; do
+       wget -c --header "Cookie: oraclelicense=$cookie; gpw_e24=$refurl" "$url"
+done
This page took 0.075363 seconds and 4 git commands to generate.