-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
50 lines (42 loc) · 835 Bytes
/
setup.sh
File metadata and controls
50 lines (42 loc) · 835 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
50
#!/bin/bash/
VENV_DIR="./vEcho"
if [ "$EUID" -ne 0 ]; then
SUDO="sudo"
else
SUDO=""
fi
if command -v apt >/dev/null 2>&1; then
PM="apt"
elif command -v apt-get >/dev/null 2>&1; then
PM="apt-get"
elif command -v pacman >/dev/null 2>&1; then
PM="pacman"
else
echo "Unsupported system: no apt, apt-get, or pacman found."
exit 1
fi
echo "Detected package manager: $PM"
case "$PM" in
apt|apt-get)
$SUDO $PM update
$SUDO $PM install -y \
python3-tk \
python3-dev \
xclip \
wl-clipboard \
tesseract-ocr \
espeak-ng
;;
pacman)
$SUDO pacman -Syu --needed \
tk \
xclip \
wl-clipboard \
tesseract \
espeak-ng
;;
esac
python3 -m venv "$VENV_DIR"
source "$VENV_DIR/bin/activate"
pip install --upgrade pip
pip install -r requirements.txt