-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·23 lines (19 loc) · 885 Bytes
/
setup.sh
File metadata and controls
executable file
·23 lines (19 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
echo Creating virtual environment.
if [ -x "$(command -v python3)" ]; then
python3 -m venv venv
elif [ -x "$(command -v python)" ]; then
python -m venv venv
fi
source venv/bin/activate || exit 1
echo Installing python libraries.
pip install -r requirements.txt
echo Installing emulator \(root access may be required\).
if [ -x "$(command -v apt)" ]; then sudo apt install xserver-xephyr
elif [ -x "$(command -v dnf)" ]; then sudo dnf install xorg-x11-server-Xephyr
elif [ -x "$(command -v yum)" ]; then sudo yum install xorg-x11-server-Xephyr
elif [ -x "$(command -v apk)" ]; then sudo apk add --no-cache Xorg-server-xephyr
elif [ -x "$(command -v zypper)" ]; then sudo zypper install xorg-x11-server-extra
elif [ -x "$(command -v pacman)" ]; then sudo pacman -S xorg-server-xephyr
else echo "You need to install: Xephyr emulator manually." >&2
fi