-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·67 lines (57 loc) · 1.44 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
#!/bin/bash
detect_os() {
case "$(uname -s)" in
Linux*) OS=Linux;;
Darwin*) OS=Mac;;
CYGWIN*) OS=Cygwin;;
MINGW*) OS=MinGw;;
*) OS="UNKNOWN:${unameOut}"
esac
echo "Detected OS: $OS"
}
install_linux() {
sudo apt update
sudo apt install ffmpeg
}
install_mac() {
brew install ffmpeg
}
install_windows() {
choco install ffmpeg
}
detect_os
if ! command -v ffmpeg &> /dev/null; then
echo "FFmpeg not found. Proceeding with installation..."
case $OS in
Linux)
install_linux
;;
Mac)
install_mac
;;
MinGw|Cygwin)
# Assuming Windows with MinGw or Cygwin
if command -v choco &> /dev/null; then
install_windows
else
echo "Chocolatey not found. Please install Chocolatey to proceed with FFmpeg installation on Windows."
fi
;;
*)
echo "Unsupported OS for FFmpeg installation"
;;
esac
echo "FFmpeg installation complete."
else
echo "FFmpeg is already installed."
fi
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
else
echo "Virtual environment already exists."
fi
echo "Activating virtual environment and installing dependencies..."
source venv/bin/activate
pip install -r requirements.txt
echo "Installation complete."