distribution/packages/hardware/quirks/autostart/020-configs
fewtarius 668f91fbb2
* Add platform quirks feature.
* Clean up quirks.
* New AMD default TDP (15w).
* Fix GPU perf setting bug.
2023-07-25 21:06:19 +00:00

24 lines
898 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
(
if [ -d "/usr/lib/autostart/quirks/platforms/${HW_DEVICE}/config" ] && \
[ ! -f ".quirk-platform-configs" ]
then
tocon "Applying ${HW_DEVICE} specific configuration..."
rsync -a --exclude={es_features.cfg,es_systems.cfg} /usr/lib/autostart/quirks/platforms/"${HW_DEVICE}"/config/* /storage/.config/ 2>/dev/null
touch /storage/.quirk-platform-configs
fi
if [ -d "/usr/lib/autostart/quirks/devices/${QUIRK_DEVICE}/config" ] && \
[ ! -f ".quirk-device-configs" ]
then
tocon "Applying ${QUIRK_DEVICE} specific configuration..."
rsync -a --exclude={es_features.cfg,es_systems.cfg} /usr/lib/autostart/quirks/devices/"${QUIRK_DEVICE}"/config/* /storage/.config/ 2>/dev/null
touch /storage/.quirk-device-configs
fi
) &