2023-07-06 14:06:31 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
tomlq -r '.languages|keys_unsorted[]' definition.toml | while IFS= read -r lang;
|
|
|
|
|
do
|
|
|
|
|
mkdir public/"$lang"/
|
|
|
|
|
cp -vr static/* public/"$lang"/
|
|
|
|
|
cp -v template/index.html public/"$lang"/
|
|
|
|
|
cp -v template/download.html public/"$lang"/
|
|
|
|
|
cp -v template/characters.html public/"$lang"/
|
2024-04-10 01:11:44 -05:00
|
|
|
sed -i -e "s/;LANG;/$lang/g" public/"$lang"/*.html
|
|
|
|
|
sed -i -e "s/;VERSION;/$(tomlq -r '.VERSION' definition.toml)/g" public/"$lang"/*.html
|
2025-06-13 18:32:23 -05:00
|
|
|
sed -i -e "s/;VERSION_APK;/$(tomlq -r '.VERSION_APK' definition.toml)/g" public/"$lang"/*.html
|
2024-04-10 01:11:44 -05:00
|
|
|
sed -i -e "s/;EMAIL;/$(tomlq -r '.EMAIL' definition.toml)/g" public/"$lang"/*.html
|
|
|
|
|
|
2023-07-06 14:06:31 -05:00
|
|
|
tomlq -r '.languages.en|keys_unsorted[]' definition.toml | while IFS= read -r replacable;
|
|
|
|
|
do
|
|
|
|
|
replacingtext=$(tomlq -r ".languages.$lang.$replacable|@html" definition.toml)
|
|
|
|
|
replacementorder="s/;$replacable;/$replacingtext/g"
|
|
|
|
|
echo "replacing ;$replacable; with $replacingtext"
|
|
|
|
|
#echo sed -i -e $replacementorder public/"$lang"/index.html
|
|
|
|
|
sed -i -e "$replacementorder" public/"$lang"/index.html
|
|
|
|
|
sed -i -e "$replacementorder" public/"$lang"/download.html
|
|
|
|
|
sed -i -e "$replacementorder" public/"$lang"/characters.html
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
done
|