1
0
Fork 0
mirror of https://github.com/Detanup01/gbe_fork.git synced 2025-04-21 21:52:06 +02:00

configureable python version for Linux in gen emu config packaging script

This commit is contained in:
otavepto 2023-12-27 21:45:20 +02:00
parent 237d7e6672
commit b960f6ca1f

View file

@ -6,17 +6,19 @@ if [ "$(id -u)" -ne 0 ]; then
exit 1 exit 1
fi fi
python_package="python3.10"
venv=".env-linux" venv=".env-linux"
reqs_file="requirements.txt" reqs_file="requirements.txt"
script_dir=$( cd -- "$( dirname -- "${0}" )" &> /dev/null && pwd ) script_dir=$( cd -- "$( dirname -- "${0}" )" &> /dev/null && pwd )
apt update || exit 1 add-apt-repository ppa:deadsnakes/ppa -y
apt install "python3.10" -y || exit 1 apt update -y || exit 1
apt install "python3.10-venv" -y || exit 1 apt install "$python_package" -y || exit 1
apt install "$python_package-venv" -y || exit 1
[[ -d "$script_dir/$venv" ]] && rm -r -f "$script_dir/$venv" [[ -d "$script_dir/$venv" ]] && rm -r -f "$script_dir/$venv"
python3.10 -m venv "$script_dir/$venv" || exit 1 $python_package -m venv "$script_dir/$venv" || exit 1
sleep 1 sleep 1
chmod 777 "$script_dir/$venv/bin/activate" chmod 777 "$script_dir/$venv/bin/activate"