-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinstallTools.sh
More file actions
118 lines (101 loc) · 3.54 KB
/
installTools.sh
File metadata and controls
118 lines (101 loc) · 3.54 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/bin/bash
# A Simple Bash Script That Attempts to Install Various Tools
# Bold Colors
RED='\033[1;31m' # Red
GREEN='\033[1;32m' # Green
YELLOW='\033[1;33m' # Yellow
BLUE='\033[1;34m' # Blue
CYAN='\033[1;36m' # Cyan
PURPLE='\033[1;35m' # Purple
WHITE='\033[1;37m' # White
# Array of color names
allcolors=("RED" "GREEN" "YELLOW" "BLUE" "CYAN" "PURPLE" "WHITE")
# Function to print banner with a random color
ascii_banner() {
# Pick a random color from the allcolors array
random_color="${allcolors[$((RANDOM % ${#allcolors[@]}))]}"
# Convert the color name to the actual escape code
case $random_color in
"RED") color_code=$RED ;;
"GREEN") color_code=$GREEN ;;
"YELLOW") color_code=$YELLOW ;;
"BLUE") color_code=$BLUE ;;
"CYAN") color_code=$CYAN ;;
"PURPLE") color_code=$PURPLE ;;
"WHITE") color_code=$WHITE ;;
esac
#--------) Display ASCII banner (--------#
# Print the banner in the chosen color
echo -e "${color_code}"
cat << "EOF"
____________________________
_____ ,\\ ___________________ \
| `------------------------' || (___________________) `|
|_____.------------------------._ || ____________________ |
Fresh Forensics `//__(____________________)___/
______________________
.' __ `.
| .'__`. = = = = |_.-----._ .---.
| `.__.' = = = = | | | \ _______________ / .-. \
|`. | | | | ````````````,) \ `-' /
| `. |_| |_/~~~~~~~~~~~~~~~' `---'
| `-;___ | `-----' ___
| /\``---..._____.' _ _...--''' ``-._
| | \ /\\` `._
| | ) __..--''\___/ \\ _.-'```''-._ `;
| | / / .' \\_.-' ````
| | / |_.-.___| .-. .'~
| `( | `-' `-' ;`._
| `. \__ ___.' //`-._ _,,,
| ) ``--../ \ // `-.,,,..-' `;
`----------' \//,_ _.-'
^ ```--...___..-'
EOF
echo -e "${RESET}" # Reset color
}
# Define tools to check
TOOLS=(
fortune-mod
cowsay
cowsay-off
xcowsay
figlet
toilet
cmatrix
oneko
espeak
libaa-bin
bb
pv
aview
x11-apps
sysvbanner
)
ascii_banner
# Arrays to track installed and failed installations
installed_tools=()
failed_tools=()
# Function to check and install tools
check_and_install() {
local tool=$1
if command -v $tool &> /dev/null; then
echo -e "${CYAN}${tool} is installed.${RESET}"
installed_tools+=("$tool")
else
echo -e "${WHITEB}${tool} ${WHITE}is ${WHITEB}NOT ${WHITE}installed. Installing...${RESET}"
if sudo apt-get install -y $tool; then
echo -e "${GREEN}${tool} successfully installed.${RESET}"
installed_tools+=("$tool")
else
echo -e "${RED}Failed to install ${tool}.${RESET}"
failed_tools+=("$tool")
fi
fi
}
# Loop through each tool and check/install
for tool in "${TOOLS[@]}"; do
check_and_install $tool
done
# Final summary
echo -e "\n${GREEN}Successfully installed tools: ${installed_tools[*]:-None}${RESET}"
echo -e "${RED}Failed to install tools: ${failed_tools[*]:-None}${RESET}"