-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstallStremioFedora.sh
executable file
·77 lines (70 loc) · 2.48 KB
/
installStremioFedora.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
# Stremio Installer for Fedora 30
clear
# Installing dependencies
dep_install() {
echo -e "\e[93m\e[40m------------------\e[0m"
echo -e "\e[93m\e[40mInstalling Dependecies\e[0m"
echo -e "\e[93m\e[40m------------------\e[0m"
sleep 1s
sudo dnf install nodejs wget librsvg2-devel librsvg2-tools mpv-libs-devel qt5-qtbase-devel qt5-qtwebengine-devel qt5-qtquickcontrols qt5-qtquickcontrols2 openssl-devel gcc g++ make glibc-devel kernel-headers binutils -y
if [ $? -ne 0 ]; then
echo -e "\e[91m\e[40mWe could not install all dependencies. Please try again!\e[0m"
read -n 1 -s -r -p "Press any key to continue"
exit 1;
fi
}
# Downloading Stremio
main_download() {
echo -e "\e[93m\e[40m-------------------\e[0m"
echo -e "\e[93m\e[40mDownloading Stremio\e[0m"
echo -e "\e[93m\e[40m-------------------\e[0m"
git clone --recurse-submodules https://github.com/Stremio/stremio-shell.git
if [ $? -ne 0 ]; then
echo -e "\e[91m\e[40mWe could not download Stremio. Check your internet connection and try again!\e[0m"
read -n 1 -s -r -p "Press any key to continue"
exit 1;
fi
}
# Patching release file so it uses qmake-qt5 because qmake is not recognized in fedora
patching() {
echo -e "\e[93m\e[40m--------------\e[0m"
echo -e "\e[93m\e[40mPatching files\e[0m"
echo -e "\e[93m\e[40m--------------\e[0m"
sed -i 's/qmake/qmake-qt5/g' release.makefile
}
# Compiling and installing Stremio
compile_install() {
echo -e "\e[93m\e[40m--------------------------------\e[0m"
echo -e "\e[93m\e[40mCompiling and installing Stremio\e[0m"
echo -e "\e[93m\e[40m--------------------------------\e[0m"
qmake-qt5
if [ $? -ne 0 ]; then
echo -e "\e[91m\e[40mCan't set the project up. QMAKE error !\e[0m"
read -n 1 -s -r -p "Press any key to continue"
exit 1;
fi
make -f release.makefile
if [ $? -ne 0 ]; then
echo -e "\e[91m\e[40mCan't compile project. MAKE error !\e[0m"
read -n 1 -s -r -p "Press any key to continue"
exit 1;
fi
sudo make -f release.makefile install
if [ $? -ne 0 ]; then
echo -e "\e[91m\e[40mCan't install the project. MAKE error !\e[0m"
read -n 1 -s -r -p "Press any key to continue"
exit 1;
fi
sudo ./dist-utils/common/postinstall
}
dep_install
main_download
cd stremio-shell
patching
compile_install
# Cleaning up
cd ..
rm -rf stremio-shell
echo "DONE!"
read -n 1 -s -r -p "Press any key to continue"
exit 0