-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·28 lines (26 loc) · 1.14 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
uname="$(uname)"
if [ "$(uname)" == "Darwin" ]; then
# Mac OS X platform
sudo curl -o /usr/local/bin/jssl -s https://raw.githubusercontent.com/pmamico/java-ssl-tools/main/src/jssl && sudo chmod +x /usr/local/bin/jssl
INSTALL_PATH=/usr/local/bin/jssl
elif [ "${uname:0:5}" == "Linux" ]; then
# GNU/Linux platform
sudo curl -o /usr/local/bin/jssl -s https://raw.githubusercontent.com/pmamico/java-ssl-tools/main/src/jssl && sudo chmod +x /usr/local/bin/jssl
INSTALL_PATH=/usr/local/bin/jssl
elif [ "${uname:0:10}" == "MINGW32_NT" ]; then
# 32 bits Windows NT platform
mkdir -p "$HOME"/bin
curl -o "$HOME"/bin/jssl -s https://raw.githubusercontent.com/pmamico/java-ssl-tools/main/src/jssl
INSTALL_PATH=$HOME/bin/jssl
elif [ "${uname:0:10}" == "MINGW64_NT" ]; then
# 64 bits Windows NT platform
mkdir -p "$HOME"/bin
curl -o "$HOME"/bin/jssl -s https://raw.githubusercontent.com/pmamico/java-ssl-tools/main/src/jssl
INSTALL_PATH=$HOME/bin/jssl
fi
if test -f "$INSTALL_PATH"; then
echo "$(jssl --version) successfully installed. ($INSTALL_PATH)"
else
echo "Failed to install jssl"
fi