Add game scanner for Raze/Build engine games to JELOS
This commit is contained in:
parent
972780dbd0
commit
d522efa167
2 changed files with 26 additions and 1 deletions
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2022-present travis134
|
||||
|
||||
. /etc/profile
|
||||
|
||||
RAZEPATH="/storage/roms/build"
|
||||
|
||||
clear >/dev/console
|
||||
echo "Scanning for games..." >/dev/console
|
||||
grp_files=$(find "${RAZEPATH}" -type f -iname "*.grp")
|
||||
echo "Adding games..." >/dev/console
|
||||
while read -r grp_file; do
|
||||
path=$(dirname "${grp_file}")
|
||||
grp=$(basename "${grp_file}")
|
||||
file="${RAZEPATH}/${grp%.*}.build"
|
||||
cat >"${file}" <<-EOM
|
||||
PATH=${path#"$RAZEPATH/"}
|
||||
GRP=${grp}
|
||||
-- end --
|
||||
EOM
|
||||
done <<<"${grp_files}"
|
||||
systemctl restart emustation
|
||||
clear >/dev/console
|
|
@ -40,7 +40,7 @@ if [ ${EXT} == "build" ]; then
|
|||
done < "${1}"
|
||||
fi
|
||||
|
||||
if [[ ! "RUN_DIR" == "/storage/roms/build" ]]; then
|
||||
if [[ ! "$RUN_DIR" == "/storage/roms/build" ]]; then
|
||||
cd "${RUN_DIR}"
|
||||
/usr/bin/raze ${params} >/var/log/raze.log 2>&1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue