Handle multiple mods cleanly

This commit is contained in:
TheSpad 2022-09-06 11:04:56 +01:00
parent ce139478ca
commit c21860dab0
No known key found for this signature in database
GPG key ID: 08F06191F4587860

View file

@ -2,7 +2,7 @@
# shellcheck shell=bash
if [[ -f "/mod-repo-packages-to-install.list" ]]; then
IFS=' ' read -ra REPO_PACKAGES <<< "$(cat /mod-repo-packages-to-install.list)"
IFS=' ' read -ra REPO_PACKAGES <<< "$(tr '\n' ' ' < /mod-repo-packages-to-install.list)"
if [[ ${#REPO_PACKAGES[@]} -ne 0 ]] && [[ ${REPO_PACKAGES[*]} != "" ]]; then
echo "**** Installing all mod packages ****"
if [[ -f /usr/bin/apt ]]; then
@ -18,7 +18,7 @@ if [[ -f "/mod-repo-packages-to-install.list" ]]; then
fi
if [[ -f "/mod-pip-packages-to-install.list" ]]; then
IFS=' ' read -ra PIP_PACKAGES <<< "$(cat /mod-pip-packages-to-install.list)"
IFS=' ' read -ra PIP_PACKAGES <<< "$(tr '\n' ' ' < /mod-pip-packages-to-install.list)"
if [[ ${#PIP_PACKAGES[@]} -ne 0 ]] && [[ ${PIP_PACKAGES[*]} != "" ]]; then
echo "**** Installing all pip packages ****"
python3 -m pip install -U pip wheel setuptools