-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdirect_run.sh
104 lines (80 loc) · 2.76 KB
/
direct_run.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
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
#!/bin/bash
#### Advanced Hyprland Installation Script by ####
#### Shell Ninja ( https://github.com/shell-ninja ) ####
# this script will be a curl of wget link. by running this script, it will clone the repository and execute the main script.
# 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"
clear && sleep 1
printf "${orange}=>${end} Starting the script...\n" && sleep 2
packages=(
git
gum
)
for pkg in "${packages[@]}"; do
if command -v pacman &> /dev/null; then
if sudo pacman -Q "$pkg" &> /dev/null; then
printf "${magenta}[ SKIP ]${end} Skipping $pkg, it was already installed..\n"
else
printf "${green}=>${end} Installing $pkg...\n"
sudo pacman -S --noconfirm "$pkg" &> /dev/null
if sudo pacman -Q "$pkg" &> /dev/null; then
printf "${cyan}::${end} $pkg was installed successfully!\n"
fi
fi
elif command -v zypper &> /dev/null; then
if sudo zypper se -i "$pkg" &>/dev/null; then
printf "${magenta}[ SKIP ]${end} Skipping $pkg, it was already installed..\n"
else
printf "${green}=>${end} Installing $pkg...\n"
sudo zypper in -y "$pkg";
if sudo zypper se -i "$pkg" &> /dev/null; then
printf "${cyan}::${end} $pkg was installed sucessfully!\n"
fi
fi
fi
done
# only for fedora
if command -v dnf &> /dev/null; then
if rpm -q git &> /dev/null; then
printf "${magenta}[ SKIP ]${end} Skipping git, it was already installed..\n"
else
printf "${green}=>${end} Installing git...\n"
sudo dnf install -y git
if rpm -q git; then
printf "${cyan}::${end} git was installed successfully!\n"
fi
fi
sleep 1
if rpm -q gum &> /dev/null; then
printf "${magenta}[ SKIP ]${end} Skipping gum, it was already installed..\n"
else
printf "${green}=>${end} Installing gum...\n"
echo '[charm]
name=Charm
baseurl=https://repo.charm.sh/yum/
enabled=1
gpgcheck=1
gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo &>/dev/null
sudo yum install --assumeyes gum
fi
if rpm -q gum &> /dev/null; then
printf "${cyan}::${end} Gum was installed successfully!\n"
fi
fi
sleep 1
[[ ! "$(pwd)" == "$HOME" ]] && cd "$HOME"
printf "${green}=>${end} Preparing the installation scripts...\n"
git clone --depth=1 https://github.com/me-js-bro/hyprconf-install.git &> /dev/null
if [[ -d "hyprconf-install" ]]; then
printf "${cyan}::${end} Starting the main script..\n" && sleep 1 && clear
cd hyprconf-install
chmod +x start.sh
./start.sh
fi