mirror of
https://github.com/home-assistant/core
synced 2024-10-04 21:12:37 +00:00
Add script to install locale (#25791)
This commit is contained in:
parent
6909235d8a
commit
a66814c772
|
@ -13,6 +13,7 @@ LABEL maintainer="Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>"
|
||||||
#ENV INSTALL_SSOCR no
|
#ENV INSTALL_SSOCR no
|
||||||
#ENV INSTALL_DLIB no
|
#ENV INSTALL_DLIB no
|
||||||
#ENV INSTALL_IPERF3 no
|
#ENV INSTALL_IPERF3 no
|
||||||
|
#ENV INSTALL_LOCALES no
|
||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ LABEL maintainer="Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>"
|
||||||
#ENV INSTALL_SSOCR no
|
#ENV INSTALL_SSOCR no
|
||||||
#ENV INSTALL_DLIB no
|
#ENV INSTALL_DLIB no
|
||||||
#ENV INSTALL_IPERF3 no
|
#ENV INSTALL_IPERF3 no
|
||||||
|
#ENV INSTALL_LOCALES no
|
||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
|
|
||||||
|
|
12
virtualization/Docker/scripts/locales
Executable file
12
virtualization/Docker/scripts/locales
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Sets up locales.
|
||||||
|
|
||||||
|
# Stop on errors
|
||||||
|
set -e
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --no-install-recommends locales
|
||||||
|
|
||||||
|
# Set the locale
|
||||||
|
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
|
||||||
|
locale-gen
|
|
@ -9,6 +9,7 @@ INSTALL_OPENALPR="${INSTALL_OPENALPR:-yes}"
|
||||||
INSTALL_LIBCEC="${INSTALL_LIBCEC:-yes}"
|
INSTALL_LIBCEC="${INSTALL_LIBCEC:-yes}"
|
||||||
INSTALL_SSOCR="${INSTALL_SSOCR:-yes}"
|
INSTALL_SSOCR="${INSTALL_SSOCR:-yes}"
|
||||||
INSTALL_DLIB="${INSTALL_DLIB:-yes}"
|
INSTALL_DLIB="${INSTALL_DLIB:-yes}"
|
||||||
|
INSTALL_LOCALES="${INSTALL_LOCALES:-yes}"
|
||||||
|
|
||||||
# Required debian packages for running hass or components
|
# Required debian packages for running hass or components
|
||||||
PACKAGES=(
|
PACKAGES=(
|
||||||
|
@ -70,6 +71,10 @@ if [ "$INSTALL_DLIB" == "yes" ]; then
|
||||||
pip3 install --no-cache-dir "dlib>=19.5"
|
pip3 install --no-cache-dir "dlib>=19.5"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$INSTALL_LOCALES" == "yes" ]; then
|
||||||
|
virtualization/Docker/scripts/locales
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove packages
|
# Remove packages
|
||||||
apt-get remove -y --purge ${PACKAGES_DEV[@]}
|
apt-get remove -y --purge ${PACKAGES_DEV[@]}
|
||||||
apt-get -y --purge autoremove
|
apt-get -y --purge autoremove
|
||||||
|
|
Loading…
Reference in a new issue