-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdirect_install.sh
More file actions
81 lines (59 loc) · 2.97 KB
/
direct_install.sh
File metadata and controls
81 lines (59 loc) · 2.97 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
#!/bin/bash
#==============================================================================
echo -e "${VIOLET}"
cat << "EOF"
██ ██ ███████ ██ ██ ████████ ████████ █████ ███ ███ ███████ ███ ██ █████ ██████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ████ ██ ████ ██ ██ ██ ██ ██ ██
██ █ ██ █████ ███████ ██ ██ ███████ ██ ████ ██ ███████ ██ ██ ██ ███████ ██████ ███████
██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███ ███ ███████ ██ ██ ██ ██ ██ ██ ██ ██ ███████ ██ ████ ██ ██ ██ ███████
EOF
echo -e "${CYAN}Capturing Gaming Moments - Custom Hyprland Setup${NC}"
echo -e "${BLUE}==================================================${NC}"
#==============================================================================
# color defination
red="\e[1;31m"
green="\e[1;32m"
yellow="\e[1;33m"
blue="\e[1;34m"
magenta="\e[1;1;35m"
cyan="\e[1;36m"
orange="\e[1;38;5;214m"
end="\e[1;0m"
printf "${orange}**${end} Starting the script...\n" && sleep 1
install_git() {
if [ -n "$(command -v pacman)" ]; then # Arch Linux
if ! pacman -Qe git &> /dev/null; then
sudo pacman -S --noconfirm git
fi
elif [ -n "$(command -v dnf)" ]; then # Fedora
if ! dnf list installed git &> /dev/null; then
sudo dnf install git -y
fi
elif [ -n "$(command -v zypper)" ]; then # openSUSE
if ! zypper se -i git &> /dev/null; then
sudo zypper in -y --no-recommends git
fi
elif [ -n "$(command -v apt)" ]; then # Ubuntu/Debian
if ! dpkg -l | grep -q "^ii git "; then
sudo apt install git -y
fi
else
printf "${red}><${end} Unsupported distribution for now..Sorry.\n"
exit 1
fi
}
install_git && printf "${cyan}::${end} Git was installed..\n"
sleep 1
printf "\n${green}**${end} Cloning the installation repository...\n"
# [[ "$(pwd)" != "$HOME" ]] && cd "$HOME"
printf "\n${green}**${end} Cloning the scripts...\n" && sleep 1 && clear
git clone --depth=1 https://github.com/Crowdrocker/Zsh.git "$HOME/.cache/Zsh" &> /dev/null
if [[ -d "$HOME/.cache/Zsh" ]]; then
cd "$HOME/.cache/Zsh"
chmod +x install.sh
./install.sh
else
printf "${red}><${end} Failed to clone repository...\n"
exit 1
fi