Skip to content

Commit ea04ece

Browse files
committed
Minor updates in README.md and installOracleJDK.sh
1 parent 07f4c2a commit ea04ece

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,31 @@
1-
oraclejdk-debian-installer
2-
============
1+
# oraclejdk-debian-installer
32

43
A Bash Shell script that will install Oracle® Java SE JDK (see notes below),
54
after you download it from
65
[oracle.com](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
76

8-
Operating System
9-
----
7+
## Operating System
108
LINUX // Debian-based distributions<br>
119
(Developed on Linux Mint 18)
1210

13-
Shell
14-
-----
11+
## Shell
1512
- Bourne Again SHell (Bash)
1613

17-
Developer
18-
-----
19-
George Z. Zachos
14+
## Developer
15+
[George Z. Zachos](http://cse.uoi.gr/~gzachos)
2016

21-
License
22-
-----
23-
[GNU GENERAL PUBLIC LICENSE // Version 2, June 1991](LICENSE)
17+
## License
18+
[GNU GENERAL PUBLIC LICENSE Version 2, June 1991](LICENSE)
2419

25-
Notes
26-
-----
20+
## Notes
2721
- This script was developed in order to cover personal needs and it is by no mean
2822
guaranteed to work properly on every system.
2923
- This script does support installation of __Oracle® JDK 9__ and __Oracle® JDK 10__!
3024
- Oracle® has proposed a new version scheme for Oracle® based builds (YY.M) starting
3125
in March, 2018. __Java SE 10 (18.3)__ will be a short term release and users should
3226
transition to the next release when available.
3327

34-
Execution
35-
-----
28+
## Execution
3629
There are two ways that you can execute this script.
3730

3831
* __1st way__:
@@ -47,11 +40,11 @@ script to enter /home/_username_/Downloads/ and search for the file to be instal
4740

4841
* __2nd way__:
4942
```Shell
50-
sudo ./installOracleJDK <absolute-path-of-directory>
43+
sudo ./installOracleJDK [absolute-path-of-directory]
5144
```
5245
This way allows you to provide the __absolute__ path of the directory containing
5346
the '_.tar.gz_' file as a command line argument, in order to override the default
54-
option. __Note that the absolute path should end with a forward slash__ ( __/__ ).
47+
option.
5548
<br><br>
5649

5750
Command example:

installOracleJDK.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,15 @@ then
9393
else
9494
# $DIRPATH is assigned the absolute path given as a command line argument.
9595
DIRPATH="${1}"
96-
# Check if $DIRPATH ends with a forward slash.
96+
# Check if $DIRPATH is an absolute path.
97+
if [ "${DIRPATH:0:1}" != "/" ]
98+
then
99+
perror_exit 2 "${DIRPATH}: Should be an absolute path."
100+
fi
101+
# Append a trailing "/" if needed.
97102
if [ "${DIRPATH:(-1)}" != "/" ]
98103
then
99-
perror_exit 2 "${DIRPATH}: Path should end with a '/'."
104+
DIRPATH="${DIRPATH}/"
100105
fi
101106
fi
102107

0 commit comments

Comments
 (0)