-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
72 lines (60 loc) · 1.62 KB
/
install.sh
File metadata and controls
72 lines (60 loc) · 1.62 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
#!/bin/bash
DESK_FILE=hyprsettings.desktop
BIN_FILE=hyprsettings
BIN_DIR=/usr/bin
BIN_APPLICATION_DIR=/usr/share/applications
cat << EOF
==========================
| Hyprsettings Installer |
==========================
EOF
guess_void() {
echo "found void proccesing with void_fucntion"
void_fucntion
}
guess_arch() {
echo "found arch proccesing with arch_function"
arch_function
}
guess_fedora() {
echo "found fedora proccesing with fedora_function"
fedora_function
}
guess_distro_and_call_relevant_install_function() {
if [ -f /etc/void-release ]; then
guess_void
elif [ -f /etc/arch-release ]; then
guess_arch
elif [ -f /etc/fedora-release ]; then
guess_fedora
else
echo "Unsupported distribution. Please install manually."
exit 1
fi
}
repo_setup() {
echo "Alert: The script Going plug additional repository because some of Depends Not"
echo "doesnt avilable in Void repos officially."
echo repository=https://raw.githubusercontent.com/Makrennel/hyprland-void/repository-x86_64-glibc | sudo tee /etc/xbps.d/hyprland-void.conf
}
#From now function for Each distro end up calling install_files function
void_fucntion() {
repo_setup
sudo xbps-install -S hyprsunset python3 python3-gobject gtk4 libadwita swaybg cargo
}
arch_function() {
sudo pacman -S --needed hyprsunset python python-gobject gtk4 libadwaita swaybg cargo
}
fedora_function() {
sudo dnf install hyprsunset python3 python3-gobject gtk4 libadwaita swaybg cargo
}
install_files() {
chmod +x $BIN_FILE
sudo cp $BIN_FILE $BIN_DIR
sudo cp $DESK_FILE $BIN_APPLICATION_DIR
}
main() {
guess_distro_and_call_relevant_install_function
install_files
}
main