distribution/packages/games/tools/control-gen/scripts/control-gen_init.sh
2022-12-22 14:02:45 -08:00

18 lines
551 B
Bash

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech)
#Check if gptokeyb exists in .config
if [ ! -d "/storage/.config/gptokeyb" ]; then
mkdir -p "/storage/.config/gptokeyb"
fi
#Link gamecontrollerdb.txt
ln -sf /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/.config/gptokeyb/gamecontrollerdb.txt
#Link gptokeyb
ln -sf /usr/bin/gptokeyb /storage/.config/gptokeyb/gptokeyb
#Run control-gen
/usr/bin/control-gen > /storage/.config/gptokeyb/control.ini