-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·42 lines (32 loc) · 901 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·42 lines (32 loc) · 901 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
#!/usr/bin/env sh
set -eu
cd "$(dirname "$0")"
PYTHON="${PYTHON:-python3}"
if ! command -v "$PYTHON" >/dev/null 2>&1; then
echo "Python 3.10 or newer is required." >&2
exit 1
fi
if ! "$PYTHON" -c 'import sys; raise SystemExit(sys.version_info < (3, 10))'; then
echo "Python 3.10 or newer is required." >&2
exit 1
fi
if ! "$PYTHON" -c 'import tkinter' >/dev/null 2>&1; then
cat >&2 <<'EOF'
Tkinter is required for the desktop interface.
Debian/Ubuntu: sudo apt install python3-tk
Fedora: sudo dnf install python3-tkinter
Arch Linux: sudo pacman -S tk
openSUSE: sudo zypper install python311-tk
EOF
exit 1
fi
if [ ! -x ".venv/bin/python" ]; then
"$PYTHON" -m venv .venv
fi
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install -r requirements.txt
cat <<'EOF'
UnityScraper is ready.
Launch it with:
./run-unityscraper.sh
EOF