-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck-install.sh
executable file
·67 lines (61 loc) · 1.29 KB
/
check-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
#!/bin/bash
ES_QUERY_DIR="${HOME}/.es-query"
ES_QUERY="${HOME}/bin/esq"
function checkDir {
if [ -d "$ES_QUERY_DIR" ]; then
echo "es-query directory found ✅"
else
echo "es-query directory not found ❌"
fi
}
function checkBin {
ESQ="$(which esq)"
if [ -f "$ESQ" ]; then
echo "ES-Query Script found ✅"
echo ""
echo $ESQ
else
echo "ES-Query Script not found ❌"
fi
}
function checkCurl {
CURL="$(which curl)"
if [ -f "$CURL" ]; then
echo "Curl found ✅"
echo ""
echo $CURL
else
echo "CURL is not installed ❌"
echo "Install it to use ES-Query"
fi
}
function checkJq {
JQ=$(which jq)
if [ -f "$JQ" ]; then
echo "Found JQuery ✅"
echo $JQ
else
echo "JQuery is not installed ❌"
echo "Install it to use ES-Query"
fi
}
echo "checking directory"
echo "******************"
checkDir
echo "******************"
echo ""
echo "checking script"
echo "******************"
checkBin
echo "******************"
echo ""
echo "checking if Curl is installed"
echo "******************"
checkCurl
echo "******************"
echo ""
echo "checking if JQ is installed"
echo "******************"
checkJq
echo "******************"
echo "All checks Done"