forked from averygan/reclip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreclip.sh
More file actions
executable file
·49 lines (41 loc) · 998 Bytes
/
Copy pathreclip.sh
File metadata and controls
executable file
·49 lines (41 loc) · 998 Bytes
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
#!/bin/bash
set -e
cd "$(dirname "$0")"
# Check prerequisites
missing=""
if ! command -v python3 &> /dev/null; then
missing="$missing python3"
fi
if ! command -v yt-dlp &> /dev/null; then
missing="$missing yt-dlp"
fi
if ! command -v ffmpeg &> /dev/null; then
missing="$missing ffmpeg"
fi
if [ -n "$missing" ]; then
echo "Missing required tools:$missing"
echo ""
if command -v brew &> /dev/null; then
echo "Install with: brew install$missing"
elif command -v apt &> /dev/null; then
echo "Install with: sudo apt install$missing"
else
echo "Please install:$missing"
fi
exit 1
fi
# Set up venv and install Python deps
if [ ! -d "venv" ]; then
echo "Setting up virtual environment..."
python3 -m venv venv
source venv/bin/activate
pip install -q flask yt-dlp
else
source venv/bin/activate
fi
PORT="${PORT:-8899}"
export PORT
echo ""
echo " ReClip is running at http://localhost:$PORT"
echo ""
python3 app.py