@@ -175,113 +175,102 @@ function apt_update() {
175
175
function copyright_msg() {
176
176
local MODE=${1}
177
177
if [ " ${MODE} " == " build_docs" ]; then
178
- echo " OAB-Java"
179
- echo " ========"
180
- fi
178
+ echo " # OAB-Java"
179
+ fi
181
180
echo ` basename ${0} ` " v${VER} - Create a local 'apt' repository for Sun Java 6 and/or Oracle Java 7 packages."
182
181
echo
183
182
echo " Copyright (c) Martin Wimpress, http://flexion.org. MIT License"
184
183
echo
185
184
echo " By running this script to download Java you acknowledge that you have"
186
185
echo " read and accepted the terms of the Oracle end user license agreement."
187
186
echo
188
- echo " * http://www.oracle.com/technetwork/java/javase/terms/license/"
187
+ echo " * < http://www.oracle.com/technetwork/java/javase/terms/license/> "
189
188
echo
190
189
# Adjust the output if we are executing the script.
191
190
# It doesn't make sense to see this message here in the documentation.
192
191
if [ " ${MODE} " != " build_docs" ]; then
193
192
echo " If you want to see what this is script is doing while it is running then execute"
194
193
echo " the following from another shell:"
195
194
echo
196
- echo " tail -f ` pwd` /` basename ${0} ` .log"
195
+ echo " tail -f ` pwd` /` basename ${0} ` .log"
197
196
echo
198
197
fi
199
198
}
200
199
201
200
function usage() {
202
201
local MODE=${1}
203
- echo " Usage"
204
- echo " -----"
205
- echo " ::"
202
+ echo " ## Usage"
206
203
echo
207
- echo " sudo ${0} "
204
+ echo " sudo ${0} "
208
205
echo
209
206
echo " Optional parameters"
210
207
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?"
216
215
echo
217
- echo " How do I download and run this thing?"
218
- echo " -------------------------------------"
219
216
echo " Like this."
220
- echo " ::"
221
217
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} ` "
226
222
echo
227
223
echo " If you are behind a proxy you may need to run using:"
228
- echo " ::"
229
224
echo
230
- echo " sudo -i ./` basename ${0} ` "
231
- echo
225
+ echo " sudo -i ./` basename ${0} ` "
226
+ echo
232
227
# Adjust the output if we are building the docs.
233
228
if [ " ${MODE} " == " build_docs" ]; then
234
229
echo " If you want to see what this script is doing while it is running then execute"
235
230
echo " the following from another shell:"
236
- echo " ::"
237
231
echo
238
- echo " tail -f ./` basename ${0} ` .log"
232
+ echo " tail -f ./` basename ${0} ` .log"
239
233
echo
240
- fi
241
- echo " How it works"
242
- echo " ------------ "
234
+ fi
235
+ echo " ## How it works"
236
+ echo
243
237
echo " This script is merely a wrapper for the most excellent Debian packaging"
244
238
echo " scripts prepared by Janusz Dziemidowicz."
245
239
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> "
248
242
echo
249
243
echo " The basic execution steps are:"
250
244
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."
260
254
echo
261
- echo " What gets installed?"
262
- echo " --------------------"
263
- echo " Nothing!"
255
+ echo " ## What gets installed?"
264
256
echo
265
257
echo " This script will no longer try and directly install or upgrade any Java"
266
258
echo " packages, instead a local ` ` apt` ` repository is created that hosts locally"
267
259
echo " built Java packages applicable to your system. It is up to you to install"
268
260
echo " or upgrade the Java packages you require using ` ` apt-get` ` , ` ` aptitude` ` or"
269
261
echo " ` ` synaptic` ` , etc. For example, once this script has been run you can simply"
270
262
echo " install the JRE by executing the following from a shell."
271
- echo " ::"
272
263
echo
273
- echo " sudo apt-get install sun-java6-jre"
264
+ echo " sudo apt-get install sun-java6-jre"
274
265
echo
275
266
echo " Or if you ran the script with the ` ` -7` ` option."
276
- echo " ::"
277
267
echo
278
- echo " sudo apt-get install oracle-java7-jre"
268
+ echo " sudo apt-get install oracle-java7-jre"
279
269
echo
280
270
echo " If you already have the *\" official\" * Ubuntu packages installed then you"
281
271
echo " can upgrade by executing the following from a shell."
282
- echo " ::"
283
272
echo
284
- echo " sudo apt-get upgrade"
273
+ echo " sudo apt-get upgrade"
285
274
echo
286
275
echo " The local ` ` apt` ` repository is just that, **local**. It is not accessible"
287
276
echo " remotely and ` basename ${0} ` will never enable that capability to ensure"
@@ -290,15 +279,14 @@ function usage() {
290
279
echo " By default, the script creates a temporary GPG keyring in the working"
291
280
echo " directory. In order to use the current user's GPG chain instead, specify"
292
281
echo " the key ID of an existing secret key. Run ` ` gpg -K` ` to list available keys."
293
- echo
294
- echo " Known Issues"
295
- echo " ------------"
296
282
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"
298
286
echo " so you only need download each file once."
299
287
echo
300
- echo " What is 'oab'?"
301
- echo " -------------- "
288
+ echo " ## What is 'oab'?"
289
+ echo
302
290
echo " Because, O.A.B! ;-)"
303
291
echo
304
292
@@ -309,29 +297,29 @@ function usage() {
309
297
}
310
298
311
299
function build_docs() {
312
- copyright_msg build_docs > README.rst
300
+ copyright_msg build_docs > README.md
313
301
314
302
# Add the usage instructions
315
- usage build_docs >> README.rst
303
+ usage build_docs >> README.md
316
304
317
305
# Add the CHANGES
318
306
if [ -e CHANGES ]; then
319
- cat CHANGES >> README.rst
307
+ cat CHANGES >> README.md
320
308
fi
321
309
322
310
# Add the AUTHORS
323
311
if [ -e AUTHORS ]; then
324
- cat AUTHORS >> README.rst
312
+ cat AUTHORS >> README.md
325
313
fi
326
314
327
315
# Add the TODO
328
316
if [ -e TODO ]; then
329
- cat TODO >> README.rst
317
+ cat TODO >> README.md
330
318
fi
331
319
332
320
# Add the LICENSE
333
321
if [ -e LICENSE ]; then
334
- cat LICENSE >> README.rst
322
+ cat LICENSE >> README.md
335
323
fi
336
324
337
325
echo " Documentation built."
@@ -561,8 +549,8 @@ pid=$!;progress_can_fail $pid
561
549
if [ -e ${WORK_PATH} /${JAVA_DEV}${JAVA_VER} _${NEW_VERSION} _${LSB_ARCH} .changes ]; then
562
550
# Remove any existing .deb files if the 'clean' option was selected.
563
551
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 &
566
554
pid=$! ; progress $pid
567
555
fi
568
556
0 commit comments