-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-CutHandler.sh
More file actions
executable file
·51 lines (42 loc) · 1.6 KB
/
install-CutHandler.sh
File metadata and controls
executable file
·51 lines (42 loc) · 1.6 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
#!/bin/bash
echo "🚀 Starting CutHandler setup..."
# --- 1. Check for and install ffmpeg ---
echo "Checking for ffmpeg and ffprobe..."
if ! command -v ffmpeg &> /dev/null || ! command -v ffprobe &> /dev/null; then
echo "ffmpeg and/or ffprobe not found. Attempting to install..."
# Check for OS and use the appropriate package manager
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
if ! command -v brew &> /dev/null; then
echo "Error: Homebrew is not installed. Please install it to continue."
exit 1
fi
echo "Installing ffmpeg with Homebrew..."
brew install ffmpeg
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Debian/Ubuntu Linux
echo "Installing ffmpeg with apt-get..."
sudo apt-get update && sudo apt-get install -y ffmpeg
else
echo "Could not detect OS. Please install ffmpeg manually."
exit 1
fi
# Verify installation
if ! command -v ffmpeg &> /dev/null || ! command -v ffprobe &> /dev/null; then
echo "ffmpeg/ffprobe installation failed. Please install it manually."
exit 1
fi
echo "ffmpeg/ffprobe installed successfully."
else
echo "✅ ffmpeg and ffprobe are already installed."
fi
# --- 2. Install Python dependencies ---
echo -e "\nInstalling Python packages from pyproject.toml..."
if [ -f "pyproject.toml" ]; then
pip install .
echo "✅ Python packages installed successfully."
else
echo "Error: pyproject.toml not found."
exit 1
fi
echo -e "\n🎉 Installation complete! You can now use 'cuthandler-clip' and 'cuthandler-xml' commands."