-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.sh
executable file
·70 lines (55 loc) · 1.75 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh
########################################################################################################################
#
# This script is used to Install pingctl, a Ping Identity CLI
#
# ------------
# Installs pingctl into .
# ------------
INSTALL_DIR=$(pwd)
if [ -f "$INSTALL_DIR/pingctl" ]; then
echo "pingctl already installed in ${INSTALL_DIR}"
echo "Please remove or move to reinstall"
exit 1
fi
TMP_DIR=$(mktemp -d)
if [ ! "$TMP_DIR" ] || [ ! -d "$TMP_DIR" ]; then
echo "Could not create temp dir."
exit 1
fi
cleanup() {
rm -rf "$TMP_DIR"
}
trap cleanup EXIT
cd "$TMP_DIR" >/dev/null 2>&1 || echo "Unable to change to temporary directory" || exit 1
curl -s https://raw.githubusercontent.com/pingidentity/homebrew-tap/master/Formula/pingctl.rb |\
grep url |\
cut -d '"' -f 2 |\
xargs curl -s -O -L
tar xzf ./*.tar.gz
cd pingctl-* || echo "Unable to change to pingctl-*" || exit 1
cp pingctl "$INSTALL_DIR/."
echo "
################################################################################
Welcome to Ping Identity pingctl CLI!
You have just downloaded:
${INSTALL_DIR}/pingctl
It is recommended to:
1. copy your 'pingctl' to a location in your PATH (i.e. ~/bin or /usr/local/bin)
2. Recommended additional utilities:
base64 (used by pingctl)
docker
docker-compose
envsubst
helm
jq (used by pingctl)
jwt (used by pingctl)
k9s
kubectl
kubectx (includes kubens)
openssl (used by pingctl)
Example:
sudo mv ${INSTALL_DIR}/pingctl /usr/local/bin/.
pingctl config
################################################################################
"