#!/bin/sh # SPDX-License-Identifier: Apache-2.0 # Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) # Copyright (C) 2022-present BrooksyTech (https://github.com/brooksytech) #If ThemeMaster does not exist copy ThemeMaster folder to roms/ports if [ ! -d "/storage/roms/ports/ThemeMaster" ] then mkdir -p /storage/roms/ports/ThemeMaster rsync -a /usr/share/ThemeMaster/* /storage/roms/ports/ThemeMaster/ chmod -R 755 /storage/roms/ports/ThemeMaster fi #Check if gamelist.xml exists, if not create gamelist.xml to hide ThemeMaster by default. if [[ ! -e /storage/roms/ports/gamelist.xml ]]; then touch /storage/roms/ports/gamelist.xml cat > /storage/roms/ports/gamelist.xml < /storage/roms/ports/ThemeMaster/ThemeMaster.sh ThemeMaster true EOF #If gamelist.xml exists and no ThemeMaster entry exists then add ThemeMaster entry & set to hidden. else if ! grep -R "ThemeMaster" "/storage/roms/ports/gamelist.xml" then sed -i 's||& \ \ /storage/roms/ports/ThemeMaster/ThemeMaster.sh\ ThemeMaster\ true\ |' /storage/roms/ports/gamelist.xml fi fi