2022-08-28 18:42:14 +00:00
|
|
|
#!/bin/bash
|
2022-09-25 23:07:27 +00:00
|
|
|
# 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
|
2022-09-02 21:46:22 +00:00
|
|
|
. /etc/profile
|
2022-09-25 23:07:27 +00:00
|
|
|
|
2023-08-10 09:12:19 +00:00
|
|
|
export SDL_AUDIODRIVER=pulseaudio
|
2022-09-25 23:07:27 +00:00
|
|
|
|
|
|
|
TZ=$(get_setting system.timezone)
|
|
|
|
echo -n "TIMEZONE=${TZ}" > /storage/.cache/timezone
|
|
|
|
echo -n "${TZ}" >/storage/.cache/system_timezone
|
|
|
|
systemctl restart tz-data.service
|
|
|
|
|
2022-10-01 00:40:33 +00:00
|
|
|
MYLOCALE=$(get_setting system.language)
|
|
|
|
if [[ -n "${MYLOCALE}" ]]
|
2022-09-25 23:07:27 +00:00
|
|
|
then
|
2022-10-01 00:40:33 +00:00
|
|
|
|
|
|
|
unset I18NPATH LANG LANGUAGE LOCPATH
|
|
|
|
|
|
|
|
MYCHARMAP="UTF-8"
|
|
|
|
MYLANG="${MYLOCALE}.${MYCHARMAP}"
|
|
|
|
MYLOCPATH="/storage/.config/emulationstation"
|
|
|
|
|
|
|
|
if [ ! -e "${MYLOCPATH}/locale/${MYLANG}/LC_NAME" ]; then
|
2022-09-25 23:07:27 +00:00
|
|
|
performance
|
2022-10-01 00:40:33 +00:00
|
|
|
I18NPATH="/usr/share/i18n"
|
|
|
|
localedef -i ${MYLOCALE} \
|
|
|
|
-c \
|
|
|
|
-v \
|
|
|
|
-f ${MYCHARMAP} \
|
|
|
|
${MYLOCPATH}/locale/${MYLANG} >/var/log/start_es.log 2>&1
|
2022-09-25 23:07:27 +00:00
|
|
|
${DEVICE_CPU_GOVERNOR}
|
|
|
|
fi
|
|
|
|
|
2022-10-01 00:40:33 +00:00
|
|
|
export LOCPATH="${MYLOCPATH}/locale"
|
|
|
|
export LANG=${MYLANG}
|
|
|
|
export LANGUAGE=${MYLANG}
|
2022-09-25 23:07:27 +00:00
|
|
|
systemctl import-environment LANG
|
|
|
|
systemctl import-environment LOCPATH
|
|
|
|
systemctl import-environment I18NPATH
|
|
|
|
systemctl import-environment LANGUAGE
|
|
|
|
fi
|
|
|
|
|
2023-07-31 13:06:42 +00:00
|
|
|
jslisten set "emulationstation"
|
|
|
|
|
2023-07-22 23:56:23 +00:00
|
|
|
emulationstation --log-path /var/log --no-splash
|