- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava8.sh
More file actions
Latest commit
executable file
·24 lines (18 loc) · 595 Bytes
/
Copy pathjava8.sh
File metadata and controls
executable file
·24 lines (18 loc) · 595 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Install Java 8
# Exit immediately if a command exits with a non-zero status
set -e
# Store a local variable of the scripts current directory
DIR="$(cd"$( dirname "${BASH_SOURCE[0]}")"&&pwd)"
if!command -v "brew"> /dev/null 2>&1;then
echo"==> Homebrew not found. Installing now..."
${DIR}/brew.sh
fi
ifcommand -v "brew"> /dev/null 2>&1;then
echo"==> Tapping OpenJDK..."
brew tap homebrew/cask-versions
echo"==> OpenJDK tapped."
echo"==> Installing OpenJDK 8..."
brew cask install adoptopenjdk8
echo"==> OpenJDK 8 installed."
fi