-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·47 lines (42 loc) · 1.19 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
#!/bin/sh
RED=$(tput setaf 1)
BACKGROUND_BANNER=
RESET=$(tput sgr0)
WARNINGF=$(tput setaf 3)
WARNINGB=$(tput setab 17)
ERRORF=$(tput setaf 1)
ERRORB=$(tput setab 232)
INFOF=$(tput setaf 255)
INFOB=$(tput setab 235)
SUCCESSF=$(tput setaf 46)
# Simple log helping function
log() {
typem=$2
message=$1
case $typem in
info)
echo "${INFOB}${INFOF}[?] Info: ${RESET}${INFOB} $message ${RESET}"
;;
warning)
echo "${WARNINGB}${WARNINGF}[*] Warning: ${RESET}${WARNINGB} $message ${RESET}"
;;
success)
echo "${SUCCESSB}${SUCCESSF}[@] Success: ${RESET}${SUCCESSB} $message ${RESET}"
;;
error)
echo "${ERRORB}${ERRORF}[!] Critical Error: ${RESET}${ERRORB} $message ${RESET}"
exit
;;
esac
}
# Installation directory of kini
INSTALLATION_DIR="${HOME}"/.local/bin
# Just make sure that the user local bin directory exists download the latest script from Github
log "Installing latest Github scripts" info
set -x
mkdir -p "${INSTALLATION_DIR}"
wget -q https://raw.githubusercontent.com/timetravelthree/kpwninit/main/kini.sh -O "${INSTALLATION_DIR}/kini"
chmod +x "${INSTALLATION_DIR}/kini"
set +x
log "Try running \`which kini\` you should see a result" success
log "Installation was successfull!" success