#!/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 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