-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathinstall.sh
executable file
·76 lines (64 loc) · 1.89 KB
/
install.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
#!/bin/bash
# Function to install packages using apt (Debian/Ubuntu)
install_with_apt() {
sudo apt update
sudo apt install -y ffmpeg exiftool jq libglfw3 libglfw3-dev yt-dlp
}
# Function to install packages using yum (Red Hat/CentOS)
install_with_yum() {
sudo yum install -y epel-release
sudo yum install -y ffmpeg perl-Image-ExifTool jq glfw glfw-devel
sudo yum install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm
sudo yum install -y yt-dlp
}
# Function to install packages using pacman (Arch Linux)
install_with_pacman() {
sudo pacman -Sy --noconfirm ffmpeg exiftool jq glfw yt-dlp
}
if [ -f /etc/arch-release ]; then
install_with_pacman
elif [ -f /etc/debian_version ]; then
install_with_apt
elif [ -f /etc/redhat-release ] || [ -f /etc/centos-release ]; then
install_with_yum
else
echo "Your linux distro is not supported currently."
echo "You need to manually install those packages: exiftool, jq, glfw"
fi
echo -e "\e[32mBuilding additional depdencies from source\e[0m"
# libleif
echo -e "\e[32mBuilding libleif\e[0m"
git clone https://github.com/cococry/leif
cd leif
./install.sh
cd ..
rm -rf leif
# taglib
echo -e "\e[32mBuilding taglib\e[0m"
git clone --recursive https://github.com/taglib/taglib.git
cd taglib
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
rm -rf taglib
make && sudo make install
if [ $? -eq 0 ]; then
echo -e "\e[32mBuilt lyssa successfully\e[0m"
echo "Copied .desktop file into /usr/share/applications."
echo "Copied binaries into /usr/bin"
fi
read -p "Do you want to start lyssa (y/n): " answer
# Convert the answer to lowercase to handle Y/y and N/n
answer=${answer,,}
# Check the user's response
if [[ "$answer" == "y" ]]; then
echo "Starting..."
lyssa
elif [[ "$answer" == "n" ]]; then
echo "Not starting the app."
else
echo "Invalid input. Please enter y or n."
fi