commit
405468abb2
|
@ -0,0 +1,35 @@
|
||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
|
if [ -f "/mod-repo-packages-to-install.list" ]; then
|
||||||
|
echo "**** Installing all mod packages ****"
|
||||||
|
if [ -f /usr/bin/apt ]; then
|
||||||
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
$(cat /mod-repo-packages-to-install.list)
|
||||||
|
elif [ -f /sbin/apk ]; then
|
||||||
|
apk add --no-cache \
|
||||||
|
$(cat /mod-repo-packages-to-install.list)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "/mod-pip-packages-to-install.list" ]; then
|
||||||
|
echo "**** Installing all pip packages ****"
|
||||||
|
python3 -m pip install -U pip wheel setuptools
|
||||||
|
if [ -f /usr/bin/apt ]; then
|
||||||
|
PIP_ARGS="-f https://wheel-index.linuxserver.io/ubuntu/"
|
||||||
|
elif [ -f /sbin/apk ]; then
|
||||||
|
ALPINE_VER=$(grep main /etc/apk/repositories | sed 's|.*alpine/v||' | sed 's|/main.*||')
|
||||||
|
if [ "${ALPINE_VER}" = "3.14" ]; then
|
||||||
|
PIP_ARGS="-f https://wheel-index.linuxserver.io/alpine/"
|
||||||
|
else
|
||||||
|
PIP_ARGS="-f https://wheel-index.linuxserver.io/alpine-${ALPINE_VER}/"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
python3 -m pip install ${PIP_ARGS} \
|
||||||
|
$(cat /mod-pip-packages-to-install.list)
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf \
|
||||||
|
/mod-repo-packages-to-install.list \
|
||||||
|
/mod-pip-packages-to-install.list
|
|
@ -0,0 +1 @@
|
||||||
|
oneshot
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/s6-overlay/s6-rc.d/init-mods-package-install/run
|
Ładowanie…
Reference in New Issue