Update Bezel Configs

Updates the bezel ".cfg" files to point to the correct bezel image file

  • Useful if your bezels came preconfigured and the rom names have changed
  • Uses the ".cfg" name to configure the path to the ".png" of the same name

Also creates a new ".cfg" for each rom in "retroarch/config/CORE_NAME/", which points to the overlay ".cfg". Be sure to delete those before running.

Simply fill in the parameters and run the ".sh" script

CONFIG_EXT=".cfg"
BEZEL_EXT=".png"
OVERLAY_CONFIG_DIR="/opt/retropie/configs/all/retroarch/overlay/GameBezels/NES/"
CORE_CONFIG_DIR="/opt/retropie/configs/all/retroarch/config/FCEUmm/"

IN_FILES="$OVERLAY_CONFIG_DIR*$CONFIG_EXT"

for f in $IN_FILES
do
  bezel_name=$(basename "$f" $CONFIG_EXT)
  sed -i -r "s|(overlay0_overlay = \").*(\")|\1$(echo $OVERLAY_CONFIG_DIR$bezel_name$BEZEL_EXT | sed -e 's/\\/\\\\/g; s/\//\\\//g; s/&/\\\&/g')\2|g" "$f"
  echo "input_overlay = \"$f\"" >> "$CORE_CONFIG_DIR$bezel_name$CONFIG_EXT"
  echo "Processing: $bezel_name$CONFIG_EXT"
done
My Keybase Page: https://keybase.io/benjamichaelson Follow Me!