Skip to content

Commit c7f9119

Browse files
committed
Migrated docs to Markdown. Sources are also cleaned when a cache clean is requested, fixes flexiondotorg#95
1 parent ab3127a commit c7f9119

File tree

4 files changed

+63
-63
lines changed

4 files changed

+63
-63
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Other contributors, listed alphabetically, are:
1818
* Martin Polden
1919
* Miah Johnson
2020
* onlymostlydead
21+
* Paul Scott
2122
* Peter Leibiger
2223
* Thorsten Möllers
2324

CHANGES

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
History
33
=======
44

5+
0.2.8
6+
-----
7+
8+
* Build now work on Raring Ringtail.
9+
10+
* Closes: https://github.com/flexiondotorg/oab-java6/issues/98
11+
* Closes: https://github.com/flexiondotorg/oab-java6/issues/92
12+
* Closes: https://github.com/flexiondotorg/oab-java6/issues/66
13+
14+
* Added spinner overide support. Thanks to Paul Scott.
15+
516
0.2.7
617
-----
718

README.rst renamed to README.md

File renamed without changes.

oab-java.sh

Lines changed: 51 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -175,113 +175,102 @@ function apt_update() {
175175
function copyright_msg() {
176176
local MODE=${1}
177177
if [ "${MODE}" == "build_docs" ]; then
178-
echo "OAB-Java"
179-
echo "========"
180-
fi
178+
echo "# OAB-Java"
179+
fi
181180
echo `basename ${0}`" v${VER} - Create a local 'apt' repository for Sun Java 6 and/or Oracle Java 7 packages."
182181
echo
183182
echo "Copyright (c) Martin Wimpress, http://flexion.org. MIT License"
184183
echo
185184
echo "By running this script to download Java you acknowledge that you have"
186185
echo "read and accepted the terms of the Oracle end user license agreement."
187186
echo
188-
echo "* http://www.oracle.com/technetwork/java/javase/terms/license/"
187+
echo "* <http://www.oracle.com/technetwork/java/javase/terms/license/>"
189188
echo
190189
# Adjust the output if we are executing the script.
191190
# It doesn't make sense to see this message here in the documentation.
192191
if [ "${MODE}" != "build_docs" ]; then
193192
echo "If you want to see what this is script is doing while it is running then execute"
194193
echo "the following from another shell:"
195194
echo
196-
echo " tail -f `pwd`/`basename ${0}`.log"
195+
echo " tail -f `pwd`/`basename ${0}`.log"
197196
echo
198197
fi
199198
}
200199

201200
function usage() {
202201
local MODE=${1}
203-
echo "Usage"
204-
echo "-----"
205-
echo "::"
202+
echo "## Usage"
206203
echo
207-
echo " sudo ${0}"
204+
echo " sudo ${0}"
208205
echo
209206
echo "Optional parameters"
210207
echo
211-
echo "* -7 : Build ``oracle-java7`` packages instead of ``sun-java6``"
212-
echo "* -c : Remove pre-existing packages from ``${WORK_PATH}/deb``"
213-
echo "* -k <gpg-key-id> : Use the specified existing key instead of generating one"
214-
echo "* -s : Skip building if the packages already exist"
215-
echo "* -h : This help"
208+
echo " * -7 : Build ``oracle-java7`` packages instead of ``sun-java6``"
209+
echo " * -c : Remove pre-existing packages from ``${WORK_PATH}/deb`` and sources from ``${WORK_PARTH}/src``."
210+
echo " * -k <gpg-key-id> : Use the specified existing key instead of generating one"
211+
echo " * -s : Skip building if the packages already exist"
212+
echo " * -h : This help"
213+
echo
214+
echo "## How do I download and run this thing?"
216215
echo
217-
echo "How do I download and run this thing?"
218-
echo "-------------------------------------"
219216
echo "Like this."
220-
echo "::"
221217
echo
222-
echo " cd ~/"
223-
echo " wget https://github.com/flexiondotorg/oab-java6/raw/${VER}/`basename ${0}` -O `basename ${0}`"
224-
echo " chmod +x `basename ${0}`"
225-
echo " sudo ./`basename ${0}`"
218+
echo " cd ~/"
219+
echo " wget https://github.com/flexiondotorg/oab-java6/raw/${VER}/`basename ${0}` -O `basename ${0}`"
220+
echo " chmod +x `basename ${0}`"
221+
echo " sudo ./`basename ${0}`"
226222
echo
227223
echo "If you are behind a proxy you may need to run using:"
228-
echo "::"
229224
echo
230-
echo " sudo -i ./`basename ${0}`"
231-
echo
225+
echo " sudo -i ./`basename ${0}`"
226+
echo
232227
# Adjust the output if we are building the docs.
233228
if [ "${MODE}" == "build_docs" ]; then
234229
echo "If you want to see what this script is doing while it is running then execute"
235230
echo "the following from another shell:"
236-
echo "::"
237231
echo
238-
echo " tail -f ./`basename ${0}`.log"
232+
echo " tail -f ./`basename ${0}`.log"
239233
echo
240-
fi
241-
echo "How it works"
242-
echo "------------"
234+
fi
235+
echo "## How it works"
236+
echo
243237
echo "This script is merely a wrapper for the most excellent Debian packaging"
244238
echo "scripts prepared by Janusz Dziemidowicz."
245239
echo
246-
echo "* https://github.com/rraptorr/sun-java6"
247-
echo "* https://github.com/rraptorr/oracle-java7"
240+
echo " * <https://github.com/rraptorr/sun-java6>"
241+
echo " * <https://github.com/rraptorr/oracle-java7>"
248242
echo
249243
echo "The basic execution steps are:"
250244
echo
251-
echo "* Remove, my now disabled, Java PPA 'ppa:flexiondotorg/java'."
252-
echo "* Install the tools required to build the Java packages."
253-
echo "* Create download cache in ``${WORK_PATH}/pkg``."
254-
echo "* Download the i586 and x64 Java install binaries from Oracle. Yes, both are required."
255-
echo "* Clone the build scripts from https://github.com/rraptorr/"
256-
echo "* Build the Java packages applicable to your system."
257-
echo "* Create local ``apt`` repository in ``${WORK_PATH}/deb`` for the newly built Java Packages."
258-
echo "* Create a GnuPG signing key in ``${WORK_PATH}/gpg`` if none exists."
259-
echo "* Sign the local ``apt`` repository using the local GnuPG signing key."
245+
echo " * Remove, my now disabled, Java PPA ``ppa:flexiondotorg/java``."
246+
echo " * Install the tools required to build the Java packages."
247+
echo " * Create download cache in ``${WORK_PATH}/pkg``."
248+
echo " * Download the i586 and x64 Java install binaries from Oracle. Yes, both are required (for sun-java6 only)."
249+
echo " * Clone the build scripts from <https://github.com/rraptorr/>"
250+
echo " * Build the Java packages applicable to your system."
251+
echo " * Create local ``apt`` repository in ``${WORK_PATH}/deb`` for the newly built Java Packages."
252+
echo " * Create a GnuPG signing key in ``${WORK_PATH}/gpg`` if none exists."
253+
echo " * Sign the local ``apt`` repository using the local GnuPG signing key."
260254
echo
261-
echo "What gets installed?"
262-
echo "--------------------"
263-
echo "Nothing!"
255+
echo "## What gets installed?"
264256
echo
265257
echo "This script will no longer try and directly install or upgrade any Java"
266258
echo "packages, instead a local ``apt`` repository is created that hosts locally"
267259
echo "built Java packages applicable to your system. It is up to you to install"
268260
echo "or upgrade the Java packages you require using ``apt-get``, ``aptitude`` or"
269261
echo "``synaptic``, etc. For example, once this script has been run you can simply"
270262
echo "install the JRE by executing the following from a shell."
271-
echo "::"
272263
echo
273-
echo " sudo apt-get install sun-java6-jre"
264+
echo " sudo apt-get install sun-java6-jre"
274265
echo
275266
echo "Or if you ran the script with the ``-7`` option."
276-
echo "::"
277267
echo
278-
echo " sudo apt-get install oracle-java7-jre"
268+
echo " sudo apt-get install oracle-java7-jre"
279269
echo
280270
echo "If you already have the *\"official\"* Ubuntu packages installed then you"
281271
echo "can upgrade by executing the following from a shell."
282-
echo "::"
283272
echo
284-
echo " sudo apt-get upgrade"
273+
echo " sudo apt-get upgrade"
285274
echo
286275
echo "The local ``apt`` repository is just that, **local**. It is not accessible"
287276
echo "remotely and `basename ${0}` will never enable that capability to ensure"
@@ -290,15 +279,14 @@ function usage() {
290279
echo "By default, the script creates a temporary GPG keyring in the working"
291280
echo "directory. In order to use the current user's GPG chain instead, specify"
292281
echo "the key ID of an existing secret key. Run ``gpg -K`` to list available keys."
293-
echo
294-
echo "Known Issues"
295-
echo "------------"
296282
echo
297-
echo "* The Oracle download servers can be horribly slow. My script caches the downloads"
283+
echo "## Known Issues"
284+
echo
285+
echo " * The Oracle download servers can be horribly slow. My script caches the downloads"
298286
echo " so you only need download each file once."
299287
echo
300-
echo "What is 'oab'?"
301-
echo "--------------"
288+
echo "## What is 'oab'?"
289+
echo
302290
echo "Because, O.A.B! ;-)"
303291
echo
304292

@@ -309,29 +297,29 @@ function usage() {
309297
}
310298

311299
function build_docs() {
312-
copyright_msg build_docs > README.rst
300+
copyright_msg build_docs > README.md
313301

314302
# Add the usage instructions
315-
usage build_docs >> README.rst
303+
usage build_docs >> README.md
316304

317305
# Add the CHANGES
318306
if [ -e CHANGES ]; then
319-
cat CHANGES >> README.rst
307+
cat CHANGES >> README.md
320308
fi
321309

322310
# Add the AUTHORS
323311
if [ -e AUTHORS ]; then
324-
cat AUTHORS >> README.rst
312+
cat AUTHORS >> README.md
325313
fi
326314

327315
# Add the TODO
328316
if [ -e TODO ]; then
329-
cat TODO >> README.rst
317+
cat TODO >> README.md
330318
fi
331319

332320
# Add the LICENSE
333321
if [ -e LICENSE ]; then
334-
cat LICENSE >> README.rst
322+
cat LICENSE >> README.md
335323
fi
336324

337325
echo "Documentation built."
@@ -561,8 +549,8 @@ pid=$!;progress_can_fail $pid
561549
if [ -e ${WORK_PATH}/${JAVA_DEV}${JAVA_VER}_${NEW_VERSION}_${LSB_ARCH}.changes ]; then
562550
# Remove any existing .deb files if the 'clean' option was selected.
563551
if [ ${BUILD_CLEAN} -eq 1 ]; then
564-
ncecho " [x] Removing existing .deb packages "
565-
rm -fv ${WORK_PATH}/deb/* >> "$log" 2>&1 &
552+
ncecho " [x] Removing existing .deb packages and sources "
553+
rm -fv ${WORK_PATH}/{deb,src}/* >> "$log" 2>&1 &
566554
pid=$!;progress $pid
567555
fi
568556

0 commit comments

Comments
 (0)