58769c80d3
* Update games to use .config/game/configs moving configurations out of the system config root. * Split modules into a separate package (packages/misc/modules). * Remove some unused packages and move a few virtual packages to packages/virtual.
45 lines
1.1 KiB
Bash
Executable file
45 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
|
|
# Copyright (C) 2020-present Fewtarius
|
|
|
|
# Source predefined functions and variables
|
|
. /etc/profile
|
|
|
|
TZ=$(get_setting system.timezone)
|
|
echo -n "TIMEZONE=${TZ}" > /storage/.cache/timezone
|
|
echo -n "${TZ}" >/storage/.cache/system_timezone
|
|
systemctl restart tz-data.service
|
|
|
|
# create charmap used for translations
|
|
locale=$(get_setting system.language)
|
|
if [ $? == "0" ]
|
|
then
|
|
charmap="UTF-8"
|
|
lang="${locale}.${charmap}"
|
|
locpath="/storage/.config/emulationstation/locale"
|
|
i18npath="$locpath/i18n"
|
|
localepath="$locpath/$lang"
|
|
|
|
if [ ! -d $localepath ]; then
|
|
export I18NPATH=$i18npath
|
|
maxperf
|
|
/usr/bin/localedef -f $charmap -i $locale $localepath
|
|
normperf
|
|
fi
|
|
|
|
export LOCPATH=$locpath
|
|
export LANG=$lang
|
|
export LANGUAGE=$lang
|
|
systemctl import-environment LANG
|
|
systemctl import-environment LOCPATH
|
|
systemctl import-environment I18NPATH
|
|
systemctl import-environment LANGUAGE
|
|
fi
|
|
|
|
if [[ ! -f "/storage/.newcfg" ]]; then
|
|
touch /storage/.newcfg
|
|
fi
|
|
|
|
exit 0
|