Skip to content

Commit 900d54b

Browse files
authored
Update main.sh
1 parent 4aad51a commit 900d54b

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

main.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
#!/bin/bash
22

3+
# ASCII art with rainbow colors
4+
ASCII_ART="
5+
6+
_______
7+
| __|.--.--.---.-.-----.---.-.
8+
|__ || | | _ |-- __| _ |
9+
|_______||___ |___._|_____|___._|
10+
|_____|
11+
"
12+
13+
# Rainbow colors
14+
RAINBOW_COLORS=(
15+
"\033[31m" # Red
16+
"\033[32m" # Green
17+
"\033[33m" # Yellow
18+
"\033[34m" # Blue
19+
"\033[35m" # Magenta
20+
"\033[36m" # Cyan
21+
)
22+
23+
# Function to print ASCII art with rainbow colors
24+
print_ascii_art_with_rainbow() {
25+
local art="$1"
26+
local colors=("${!2}")
27+
local lines=()
28+
29+
# Split the ASCII art into lines
30+
while IFS= read -r line; do
31+
lines+=("$line")
32+
done <<< "$art"
33+
34+
# Print each line with a different color from the rainbow
35+
local color_index=0
36+
for line in "${lines[@]}"; do
37+
echo -e "${colors[$color_index]}$line"
38+
color_index=$(( (color_index + 1) % ${#colors[@]} ))
39+
done
40+
}
41+
42+
# Call the function to print ASCII art with rainbow colors
43+
print_ascii_art_with_rainbow "$ASCII_ART" RAINBOW_COLORS[@]
44+
345
# Direktori root di mana semua sub-folder berada
446
DIR="../automation-scripts"
547
LOG_FILE="$DIR/run_log.txt"

0 commit comments

Comments
 (0)