Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged several pull requests which close #18 and close #12.

  • Loading branch information...
commit 8e666775dc587fe2625914cf4c31872632127007 1 parent 2ed9a03
Martin Wimpress authored
Showing with 369 additions and 302 deletions.
  1. +15 −0 AUTHORS
  2. +40 −33 CHANGES
  3. +0 −194 README
  4. +231 −0 README.rst
  5. +2 −1  TODO
  6. +81 −74 oab-java6.sh
15 AUTHORS
View
@@ -0,0 +1,15 @@
+
+Credits
+=======
+
+This package is written and maintained by Martin Wimpress, <code@flexion.org>
+
+Other contributors, listed alphabetically, are:
+
+* Derek Chen-Becker - Added an option to skip rebuilding packages.
+* Eshwar Andhavarapu - Added comments in the apt source file.
+* Martin Polden - Fixed download binary packages from Oracle.
+* Miah Johnson - Fixed download binary packages from Oracle.
+* Thorsten Möllers - Fixed git cloning for users behind restrictive firewalls.
+
+Many thanks for all contributions!
73 CHANGES
View
@@ -2,81 +2,88 @@
History
=======
+0.1.9
+-----
+
+ * Fixed download of the Oracle binary packages, which now requires cookies. Thanks to Martin Polden and Miah Johnson.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/18
+ * Added an option (-s) to skip rebuilding if packages already exist, tanks to Derek Chen-Becker.
+ * Added a comment to the apt source file, thanks to Eshwar Andhavarapu.
+ * Added documentation for user running the script behind a proxy server, thanks to Olzhas.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/12
+ * Should now build on Ubuntu 12.04 LTS, but untested.
+ * Updated documentation which is now correctly formatted as reStructuredText.
+
0.1.8
-----
- * Added dynamic determination of Java package URLs and sizes
- * Added an option (-c) to optionally clean .deb package
+ * Added dynamic determination of Java package URLs and sizes.
+ * Added an option (``-c``) to optionally clean .deb package.
- Closes : https://github.com/flexiondotorg/oab-java6/issues/10
0.1.7
-----
- * Fixed GPG key creation on VMware ESX Server
+ * Fixed GPG key creation on VMware ESX Server.
- Closes : https://github.com/flexiondotorg/oab-java6/issues/11
- * Fixed clone of the 'sun-java6' repository for users behind restrictive
- firewalls, thanks to Thorsten Möllers
+ * Fixed clone of the ``sun-java6`` repository for users behind restrictive firewalls, thanks to Thorsten Möllers.
0.1.6
-----
- * Fixed downloading of common.sh when ca-certificates is not installed
+ * Fixed downloading of ``common.sh`` when ca-certificates is not installed.
- Closes : https://github.com/flexiondotorg/oab-java6/issues/3
* Updated to support Java6u31
- Closes : https://github.com/flexiondotorg/oab-java6/issues/7
- Closes : https://github.com/flexiondotorg/oab-java6/issues/8
- - NOTE! Requires that the upstream script tags Java6u31 as stable, see the
- following ticket https://github.com/rraptorr/sun-java6/issues/3
- * Prevent script from running under Ubuntu Precise as it is currently
- known to be unsupported.
+ - NOTE! Requires that the upstream script tags Java6u31 as stable, see the following ticket https://github.com/rraptorr/sun-java6/issues/3
+ * Prevent script from running under Ubuntu Precise as it is currently known to be unsupported.
- Closes : https://github.com/flexiondotorg/oab-java6/issues/4
- * Prevent automated key generation when running in an OpenVZ
- container because I'm too stupid to work out a proper solution
+ * Prevent automated key generation when running in an OpenVZ container because I'm too stupid to work out a proper solution
0.1.5
-----
- * Fixed missing code that actually does the build
+ * Fixed missing code that actually does the build.
0.1.4
-----
- * Added GnuPG signing of the local 'apt' repository
- * Updated package building to preserve the upstream package urgency
- * Refactored to remove hard coded versions, now uses 'debian/changelog'
- * Fixed the 'override' file generation to ensure it doesn't contain duplicates
- * Updated documentation
+ * Added GnuPG signing of the local ``apt`` repository.
+ * Updated package building to preserve the upstream package urgency.
+ * Re-factored to remove hard coded versions, now uses ``debian/changelog``.
+ * Fixed the ``override`` file generation to ensure it doesn't contain duplicates.
+ * Updated documentation.
0.1.3
-----
- * Added checking out of tagged releases of the upstream scripts
+ * Added checking out of tagged releases of the upstream scripts.
- Closes : https://github.com/flexiondotorg/oab-java6/issues/1
- * Added loose distribution checking so it should now work with Linux Mint and
- other Ubuntu derivatives
+ * Added loose distribution checking so it should now work with Linux Mint and other Ubuntu derivatives.
- Closes : https://github.com/flexiondotorg/oab-java6/issues/2
- * Added the creation of a local 'apt' repository
- * Removed installation of Java packages, you can now use 'apt-get' yourself
+ * Added the creation of a local ``apt`` repository
+ * Removed installation of Java packages, you can now use ``apt-get`` yourself
* Updated documentation
0.1.2
-----
- * Fixed build requirements
- * Fixed install of 'ia32-sun-java6-bin' on 64-bit systems
- * Fixed install of Java browser plugin on systems without a supported browser
- * Added runtime requirements
- * Added TODO
- * Updated documentation
+ * Fixed build requirements.
+ * Fixed install of ``ia32-sun-java6-bin`` on 64-bit systems.
+ * Fixed install of Java browser plug-in on systems without a supported browser.
+ * Added runtime requirements.
+ * Added TODO.
+ * Updated documentation.
0.1.1
-----
- * Updated to use dynamic version detection throughout
- * Fixed package installation when upgrading
- * Minor documentation updates
+ * Updated to use dynamic version detection throughout.
+ * Fixed package installation when upgrading.
+ * Minor documentation updates.
0.1.0
-----
- * Initial release
+ * Initial release.
194 README
View
@@ -1,194 +0,0 @@
-oab-java6.sh v0.1.8 - Create a local 'apt' repository for Ubuntu Java packages.
-Copyright (c) 2012 Flexion.Org, http://flexion.org. MIT License
-
-By running this script to download Java you acknowledge that you have
-read and accepted the terms of the Oracle end user license agreement.
-
- - http://www.oracle.com/technetwork/java/javase/terms/license/
-
-If you want to see what this is script is doing while it is running then execute
-the following from another shell:
-
- tail -f ./oab-java6.sh.log
-
-Usage
-
- sudo ./oab-java6.sh
-
-Optional parameters
- -c : Remove pre-existing packages from '/var/local/oab/deb'
- -h : This help
-
-How do I download and run this thing?
-=====================================
-Like this.
-
- cd ~/
- wget https://raw.github.com/flexiondotorg/oab-java6/master/oab-java6.sh -O oab-java6.sh
- chmod +x oab-java6.sh
- sudo ./oab-java6.sh
-
-How it works
-============
-This script is merely a wrapper for the most excllent Debian packaging
-scripts prepared by Janusz Dziemidowicz.
-
- - https://github.com/rraptorr/sun-java6
-
-The basic execution steps are:
-
- - Remove, my now disabled, Java PPA 'ppa:flexiondotorg/java'.
- - Install the tools required to build the Java packages.
- - Create download cache in '/var/local/oab/pkg'.
- - Download the i586 and x64 Java install binaries from Oracle. Yes, both are required.
- - Clone the build scripts from https://github.com/rraptorr/sun-java6
- - Build the Java packages applicable to your system.
- - Create local 'apt' repository in '/var/local/oab/deb' for the newly built Java Packages.
- - Create a GnuPG signing key in '/var/local/oab/gpg' if none exists.
- - Sign the local 'apt' repository using the local GnuPG signing key.
-
-What gets installed?
-====================
-Nothing!
-
-This script will no longer try and directly install or upgrade any Java
-packages, instead a local 'apt' repository is created that hosts locally
-built Java packages applicable to your system. It is up to you to install
-or upgrade the Java packages you require using 'apt-get', 'aptitude' or
-'synaptic', etc. For example, once this script has been run you can simply
-install the JRE by executing the following from a shell.
-
- sudo apt-get install sun-java6-jre
-
-Or if you already have the "official" Ubuntu packages installed then you
-can upgrade by executing the folowing from a shell.
-
- sudo apt-get upgrade
-
-The local 'apt' repository is just that, **local**. It is not accessible
-remotely and oab-java6.sh will never enable that capability to ensure
-compliance with Oracle's asinine license requirements.
-
-Known Issues
-============
-
- - The Oracle download servers can be horribly slow. My script caches the
- downloads so you only need download each file once.
-
-What is 'oab'?
-==============
-Because, O.A.B! ;-)
-
-
-History
-=======
-
-0.1.8
------
-
- * Added dynamic determination of Java package URLs and sizes
- * Added an option (-c) to optionally clean .deb package
- - Closes : https://github.com/flexiondotorg/oab-java6/issues/10
-
-0.1.7
------
-
- * Fixed GPG key creation on VMware ESX Server
- - Closes : https://github.com/flexiondotorg/oab-java6/issues/11
- * Fixed clone of the 'sun-java6' repository for users behind restrictive
- firewalls, thanks to Thorsten Möllers
-
-0.1.6
------
-
- * Fixed downloading of common.sh when ca-certificates is not installed
- - Closes : https://github.com/flexiondotorg/oab-java6/issues/3
- * Updated to support Java6u31
- - Closes : https://github.com/flexiondotorg/oab-java6/issues/7
- - Closes : https://github.com/flexiondotorg/oab-java6/issues/8
- - NOTE! Requires that the upstream script tags Java6u31 as stable, see the
- following ticket https://github.com/rraptorr/sun-java6/issues/3
- * Prevent script from running under Ubuntu Precise as it is currently
- known to be unsupported.
- - Closes : https://github.com/flexiondotorg/oab-java6/issues/4
- * Prevent automated key generation when running in an OpenVZ
- container because I'm too stupid to work out a proper solution
-
-0.1.5
------
-
- * Fixed missing code that actually does the build
-
-0.1.4
------
-
- * Added GnuPG signing of the local 'apt' repository
- * Updated package building to preserve the upstream package urgency
- * Refactored to remove hard coded versions, now uses 'debian/changelog'
- * Fixed the 'override' file generation to ensure it doesn't contain duplicates
- * Updated documentation
-
-0.1.3
------
-
- * Added checking out of tagged releases of the upstream scripts
- - Closes : https://github.com/flexiondotorg/oab-java6/issues/1
- * Added loose distribution checking so it should now work with Linux Mint and
- other Ubuntu derivatives
- - Closes : https://github.com/flexiondotorg/oab-java6/issues/2
- * Added the creation of a local 'apt' repository
- * Removed installation of Java packages, you can now use 'apt-get' yourself
- * Updated documentation
-
-0.1.2
------
-
- * Fixed build requirements
- * Fixed install of 'ia32-sun-java6-bin' on 64-bit systems
- * Fixed install of Java browser plugin on systems without a supported browser
- * Added runtime requirements
- * Added TODO
- * Updated documentation
-
-0.1.1
------
-
- * Updated to use dynamic version detection throughout
- * Fixed package installation when upgrading
- * Minor documentation updates
-
-0.1.0
------
-
- * Initial release
-
-Todo
-====
-
-* Remove automatic signing key generation and add support for selecting a
- pre-existing signing key.
-* Add support to build for a given Ubuntu distribution.
-* Add support to optionally build using 'pbuilder'.
-* Add support for Java 7.
-
-License
-=======
-
-Copyright (c) 2012 Martin Wimpress, http://flexion.org/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
231 README.rst
View
@@ -0,0 +1,231 @@
+OAB-Java6
+=========
+oab-java6.sh v0.1.9 - Create a local 'apt' repository for Ubuntu Java packages.
+Copyright (c) Martin Wimpress, http://flexion.org. MIT License
+
+By running this script to download Java you acknowledge that you have
+read and accepted the terms of the Oracle end user license agreement.
+
+* http://www.oracle.com/technetwork/java/javase/terms/license/
+
+Usage
+-----
+::
+
+ sudo ./oab-java6.sh
+
+Optional parameters
+
+* -c : Remove pre-existing packages from /var/local/oab/deb
+* -s : Skip building if the packages already exist
+* -h : This help
+
+How do I download and run this thing?
+-------------------------------------
+Like this.
+::
+
+ cd ~/
+ wget https://raw.github.com/flexiondotorg/oab-java6/master/oab-java6.sh -O oab-java6.sh
+ chmod +x oab-java6.sh
+ sudo ./oab-java6.sh
+
+If you are behind a proxy you may need to run using:
+::
+
+ sudo -i ./oab-java6.sh
+
+If you want to see what this is script is doing while it is running then execute
+the following from another shell:
+::
+
+ tail -f ./oab-java6.sh.log
+
+How it works
+------------
+This script is merely a wrapper for the most excellent Debian packaging
+scripts prepared by Janusz Dziemidowicz.
+
+* https://github.com/rraptorr/sun-java6
+
+The basic execution steps are:
+
+* Remove, my now disabled, Java PPA 'ppa:flexiondotorg/java'.
+* Install the tools required to build the Java packages.
+* Create download cache in /var/local/oab/pkg.
+* Download the i586 and x64 Java install binaries from Oracle. Yes, both are required.
+* Clone the build scripts from https://github.com/rraptorr/sun-java6
+* Build the Java packages applicable to your system.
+* Create local apt repository in /var/local/oab/deb for the newly built Java Packages.
+* Create a GnuPG signing key in /var/local/oab/gpg if none exists.
+* Sign the local apt repository using the local GnuPG signing key.
+
+What gets installed?
+--------------------
+Nothing!
+
+This script will no longer try and directly install or upgrade any Java
+packages, instead a local apt repository is created that hosts locally
+built Java packages applicable to your system. It is up to you to install
+or upgrade the Java packages you require using apt-get, aptitude or
+synaptic, etc. For example, once this script has been run you can simply
+install the JRE by executing the following from a shell.
+::
+
+ sudo apt-get install sun-java6-jre
+
+Or if you already have the *"official"* Ubuntu packages installed then you
+can upgrade by executing the following from a shell.
+::
+
+ sudo apt-get upgrade
+
+The local apt repository is just that, **local**. It is not accessible
+remotely and oab-java6.sh will never enable that capability to ensure
+compliance with Oracle's asinine license requirements.
+
+Known Issues
+------------
+
+* The Oracle download servers can be horribly slow. My script caches the downloads so you only need download each file once.
+
+What is 'oab'?
+--------------
+Because, O.A.B! ;-)
+
+
+History
+=======
+
+0.1.9
+-----
+
+ * Fixed download of the Oracle binary packages, which now requires cookies. Thanks to Martin Polden and Miah Johnson.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/18
+ * Added an option (-s) to skip rebuilding if packages already exist, tanks to Derek Chen-Becker.
+ * Added a comment to the apt source file, thanks to Eshwar Andhavarapu.
+ * Added documentation for user running the script behind a proxy server, thanks to Olzhas.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/12
+ * Should now build on Ubuntu 12.04 LTS, but untested.
+ * Updated documentation which is now correctly formatted as reStructuredText.
+
+0.1.8
+-----
+
+ * Added dynamic determination of Java package URLs and sizes.
+ * Added an option (``-c``) to optionally clean .deb package.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/10
+
+0.1.7
+-----
+
+ * Fixed GPG key creation on VMware ESX Server.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/11
+ * Fixed clone of the ``sun-java6`` repository for users behind restrictive firewalls, thanks to Thorsten Möllers.
+
+0.1.6
+-----
+
+ * Fixed downloading of ``common.sh`` when ca-certificates is not installed.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/3
+ * Updated to support Java6u31
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/7
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/8
+ - NOTE! Requires that the upstream script tags Java6u31 as stable, see the following ticket https://github.com/rraptorr/sun-java6/issues/3
+ * Prevent script from running under Ubuntu Precise as it is currently known to be unsupported.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/4
+ * Prevent automated key generation when running in an OpenVZ container because I'm too stupid to work out a proper solution
+
+0.1.5
+-----
+
+ * Fixed missing code that actually does the build.
+
+0.1.4
+-----
+
+ * Added GnuPG signing of the local ``apt`` repository.
+ * Updated package building to preserve the upstream package urgency.
+ * Re-factored to remove hard coded versions, now uses ``debian/changelog``.
+ * Fixed the ``override`` file generation to ensure it doesn't contain duplicates.
+ * Updated documentation.
+
+0.1.3
+-----
+
+ * Added checking out of tagged releases of the upstream scripts.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/1
+ * Added loose distribution checking so it should now work with Linux Mint and other Ubuntu derivatives.
+ - Closes : https://github.com/flexiondotorg/oab-java6/issues/2
+ * Added the creation of a local ``apt`` repository
+ * Removed installation of Java packages, you can now use ``apt-get`` yourself
+ * Updated documentation
+
+0.1.2
+-----
+
+ * Fixed build requirements.
+ * Fixed install of ``ia32-sun-java6-bin`` on 64-bit systems.
+ * Fixed install of Java browser plug-in on systems without a supported browser.
+ * Added runtime requirements.
+ * Added TODO.
+ * Updated documentation.
+
+0.1.1
+-----
+
+ * Updated to use dynamic version detection throughout.
+ * Fixed package installation when upgrading.
+ * Minor documentation updates.
+
+0.1.0
+-----
+
+ * Initial release.
+
+Credits
+=======
+
+This package is written and maintained by Martin Wimpress, <code@flexion.org>
+
+Other contributors, listed alphabetically, are:
+
+* Derek Chen-Becker - Added an option to skip rebuilding packages.
+* Eshwar Andhavarapu - Added comments in the apt source file.
+* Martin Polden - Fixed download binary packages from Oracle.
+* Miah Johnson - Fixed download binary packages from Oracle.
+* Thorsten Möllers - Fixed git cloning for users behind restrictive firewalls.
+
+Many thanks for all contributions!
+
+Todo
+====
+
+* Remove automatic signing key generation and add support for selecting a
+ pre-existing signing key.
+* Check the binary packages downloaded from Oracle are the correct size.
+* Add support to build for a given Ubuntu distribution.
+* Add support to optionally build using ``pbuilder``.
+* Add support for Java 7.
+
+License
+=======
+
+Copyright (c) 2012 Martin Wimpress, http://flexion.org/
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3  TODO
View
@@ -4,6 +4,7 @@ Todo
* Remove automatic signing key generation and add support for selecting a
pre-existing signing key.
+* Check the binary packages downloaded from Oracle are the correct size.
* Add support to build for a given Ubuntu distribution.
-* Add support to optionally build using 'pbuilder'.
+* Add support to optionally build using ``pbuilder``.
* Add support for Java 7.
155 oab-java6.sh
View
@@ -1,31 +1,8 @@
#!/usr/bin/env bash
+# Copyright (c) Martin Wimpress
+# http://flexion.org/
+# See the file "LICENSE" for the full license governing this code.
-# License
-#
-# Create a local 'apt' repository for Ubuntu Java packages.
-# Copyright (c) 2012 Flexion.Org, http://flexion.org/
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use,
-# copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following
-# conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
# References
# - https://github.com/rraptorr/sun-java6
# - http://ubuntuforums.org/showthread.php?t=1090731
@@ -36,96 +13,118 @@ VER="0.1.9"
function copyright_msg() {
local MODE=${1}
+ if [ "${MODE}" == "build_docs" ]; then
+ echo "OAB-Java6"
+ echo "========="
+ fi
echo `basename ${0}`" v${VER} - Create a local 'apt' repository for Ubuntu Java packages."
- echo "Copyright (c) `date +%Y` Flexion.Org, http://flexion.org. MIT License"
+ echo "Copyright (c) Martin Wimpress, http://flexion.org. MIT License"
echo
echo "By running this script to download Java you acknowledge that you have"
echo "read and accepted the terms of the Oracle end user license agreement."
echo
- echo " - http://www.oracle.com/technetwork/java/javase/terms/license/"
+ echo "* http://www.oracle.com/technetwork/java/javase/terms/license/"
echo
- echo "If you want to see what this is script is doing while it is running then execute"
- echo "the following from another shell:"
- echo
-
- # Adjust the output if we are building the docs.
+ # Adjust the output if we are executing the script.
if [ "${MODE}" != "build_docs" ]; then
+ echo "If you want to see what this is script is doing while it is running then execute"
+ echo "the following from another shell:"
+ echo
echo " tail -f `pwd`/`basename ${0}`.log"
- else
- echo " tail -f ./`basename ${0}`.log"
- fi
- echo
+ echo
+ #else
+ # echo " tail -f ./`basename ${0}`.log"
+ fi
}
function usage() {
local MODE=${1}
echo "Usage"
+ echo "-----"
+ echo "::"
echo
- echo " sudo ${0}"
+ echo " sudo ${0}"
echo
echo "Optional parameters"
- echo " -s : Skip building if the package exists"
- echo " -c : Remove pre-existing packages from '/var/local/oab/deb'"
- echo " -h : This help"
+ echo
+ echo "* ``-c`` : Remove pre-existing packages from ``/var/local/oab/deb``"
+ echo "* ``-s`` : Skip building if the packages already exist"
+ echo "* ``-h`` : This help"
echo
echo "How do I download and run this thing?"
- echo "====================================="
+ echo "-------------------------------------"
echo "Like this."
+ echo "::"
echo
echo " cd ~/"
echo " wget https://raw.github.com/flexiondotorg/oab-java6/master/`basename ${0}` -O `basename ${0}`"
echo " chmod +x `basename ${0}`"
echo " sudo ./`basename ${0}`"
echo
+ echo "If you are behind a proxy you may need to run using:"
+ echo "::"
+ echo
+ echo " sudo -i ./`basename ${0}`"
+ echo
+ # Adjust the output if we are building the docs.
+ if [ "${MODE}" == "build_docs" ]; then
+ echo "If you want to see what this is script is doing while it is running then execute"
+ echo "the following from another shell:"
+ echo "::"
+ echo
+ echo " tail -f ./`basename ${0}`.log"
+ fi
+ echo
echo "How it works"
- echo "============"
- echo "This script is merely a wrapper for the most excllent Debian packaging"
+ echo "------------"
+ echo "This script is merely a wrapper for the most excellent Debian packaging"
echo "scripts prepared by Janusz Dziemidowicz."
echo
- echo " - https://github.com/rraptorr/sun-java6"
+ echo "* https://github.com/rraptorr/sun-java6"
echo
echo "The basic execution steps are:"
echo
- echo " - Remove, my now disabled, Java PPA 'ppa:flexiondotorg/java'."
- echo " - Install the tools required to build the Java packages."
- echo " - Create download cache in '/var/local/oab/pkg'."
- echo " - Download the i586 and x64 Java install binaries from Oracle. Yes, both are required."
- echo " - Clone the build scripts from https://github.com/rraptorr/sun-java6"
- echo " - Build the Java packages applicable to your system."
- echo " - Create local 'apt' repository in '/var/local/oab/deb' for the newly built Java Packages."
- echo " - Create a GnuPG signing key in '/var/local/oab/gpg' if none exists."
- echo " - Sign the local 'apt' repository using the local GnuPG signing key."
+ echo "* Remove, my now disabled, Java PPA 'ppa:flexiondotorg/java'."
+ echo "* Install the tools required to build the Java packages."
+ echo "* Create download cache in ``/var/local/oab/pkg``."
+ echo "* Download the i586 and x64 Java install binaries from Oracle. Yes, both are required."
+ echo "* Clone the build scripts from https://github.com/rraptorr/sun-java6"
+ echo "* Build the Java packages applicable to your system."
+ echo "* Create local ``apt`` repository in ``/var/local/oab/deb`` for the newly built Java Packages."
+ echo "* Create a GnuPG signing key in ``/var/local/oab/gpg`` if none exists."
+ echo "* Sign the local ``apt`` repository using the local GnuPG signing key."
echo
echo "What gets installed?"
- echo "===================="
+ echo "--------------------"
echo "Nothing!"
echo
echo "This script will no longer try and directly install or upgrade any Java"
- echo "packages, instead a local 'apt' repository is created that hosts locally"
+ echo "packages, instead a local ``apt`` repository is created that hosts locally"
echo "built Java packages applicable to your system. It is up to you to install"
- echo "or upgrade the Java packages you require using 'apt-get', 'aptitude' or"
- echo "'synaptic', etc. For example, once this script has been run you can simply"
+ echo "or upgrade the Java packages you require using ``apt-get``, ``aptitude`` or"
+ echo "``synaptic``, etc. For example, once this script has been run you can simply"
echo "install the JRE by executing the following from a shell."
+ echo "::"
echo
echo " sudo apt-get install sun-java6-jre"
echo
- echo "Or if you already have the \"official\" Ubuntu packages installed then you"
- echo "can upgrade by executing the folowing from a shell."
+ echo "Or if you already have the *\"official\"* Ubuntu packages installed then you"
+ echo "can upgrade by executing the following from a shell."
+ echo "::"
echo
echo " sudo apt-get upgrade"
echo
- echo "The local 'apt' repository is just that, **local**. It is not accessible"
+ echo "The local ``apt`` repository is just that, **local**. It is not accessible"
echo "remotely and `basename ${0}` will never enable that capability to ensure"
echo "compliance with Oracle's asinine license requirements."
echo
echo "Known Issues"
- echo "============"
+ echo "------------"
echo
- echo " - The Oracle download servers can be horribly slow. My script caches the"
- echo " downloads so you only need download each file once."
+ echo "* The Oracle download servers can be horribly slow. My script caches the downloads so you only need download each file once."
echo
echo "What is 'oab'?"
- echo "=============="
+ echo "--------------"
echo "Because, O.A.B! ;-)"
echo
@@ -136,24 +135,29 @@ function usage() {
}
function build_docs() {
- copyright_msg build_docs > README
+ copyright_msg build_docs > README.rst
# Add the usage instructions
- usage build_docs >> README
+ usage build_docs >> README.rst
# Add the CHANGES
if [ -e CHANGES ]; then
- cat CHANGES >> README
+ cat CHANGES >> README.rst
+ fi
+
+ # Add the AUTHORS
+ if [ -e AUTHORS ]; then
+ cat AUTHORS >> README.rst
fi
# Add the TODO
if [ -e TODO ]; then
- cat TODO >> README
+ cat TODO >> README.rst
fi
# Add the LICENSE
if [ -e LICENSE ]; then
- cat LICENSE >> README
+ cat LICENSE >> README.rst
fi
echo "Documentation built."
@@ -191,6 +195,7 @@ check_ubuntu "all"
BUILD_KEY=""
BUILD_CLEAN=0
+SKIP_REBUILD=0
# Parse the options
OPTSTRING=bchk:s
@@ -303,8 +308,9 @@ done
# Determine the new version
NEW_VERSION="${DEB_VERSION}~${LSB_CODE}1"
-if [ -n "$SKIP_REBUILD" -a -r "/var/local/oab/deb/sun-java${JAVA_VER}_${NEW_VERSION}_${LSB_ARCH}.changes" ]; then
- echo " [x] Package exists, skipping build "
+if [ -n "${SKIP_REBUILD}" -a -r "/var/local/oab/deb/sun-java${JAVA_VER}_${NEW_VERSION}_${LSB_ARCH}.changes" ]; then
+ echo " [!] Package exists, skipping build "
+ echo "All done!"
exit
fi
@@ -438,7 +444,8 @@ if [ -e /var/local/oab/gpg/pubring.gpg ] && [ -e /var/local/oab/gpg/secring.gpg
fi
# Update apt cache
-echo "deb file:///var/local/oab/deb / # Sun Java 6 by flexiondotorg" > /etc/apt/sources.list.d/oab.list
+echo "# Sun Java6 - https://github.com/flexiondotorg/oab-java6" > /etc/apt/sources.list.d/oab.list
+echo "deb file:///var/local/oab/deb /" >> /etc/apt/sources.list.d/oab.list
apt_update
-echo "All done!"
+echo "All done!"
Please sign in to comment.
Something went wrong with that request. Please try again.