Updated to use cont-init.d logic and added local translation option.

This commit is contained in:
Alexander Schomburg
2021-11-30 20:45:22 +01:00
parent 197b7c62f1
commit 06f7b7bfb4
4 changed files with 38 additions and 23 deletions
@@ -0,0 +1,21 @@
#!/usr/bin/with-contenv bash
if [ ! -z "${TRANSLATIONS}" ]; then
OLDIFS=$IFS
IFS=','
for translation in ${TRANSLATIONS}; do
IFS=$OLDIFS
if [[ -d "/translations/${translation}" ]]; then
echo "**** install local translation: ${translation} ****"
cp -R "/translations/${translation}/*" /app/projectsend/
else
echo "**** install online translation: ${translation} ****"
curl -s -o "/tmp/${translation}.zip" -L "https://www.projectsend.org/translations/get.php?lang=${translation}"
unzip -o "/tmp/${translation}.zip" -d /app/projectsend;
fi
done
echo "**** cleanup ****"
rm -rf /tmp/*
fi
while :; do :; done & kill -STOP $! && wait $!
-16
View File
@@ -1,16 +0,0 @@
#!/bin/bash -e
if [ ! -z "${TRANSLATIONS}" ]; then
OLDIFS=$IFS
IFS=','
for translation in ${TRANSLATIONS}; do
IFS=$OLDIFS
echo "**** install translation: ${translation} ****"
curl -s -o "/tmp/${translation}.zip" -L "https://www.projectsend.org/translations/get.php?lang=${translation}"
unzip -o "/tmp/${translation}.zip" -d /app/projectsend;
done
echo "**** cleanup ****"
rm -rf /tmp/*
fi
while :; do :; done & kill -STOP $! && wait $!