Skip to content

Instantly share code, notes, and snippets.

@salamcast
Created June 2, 2025 18:55
Show Gist options
  • Save salamcast/ed022d187ed847593bc68b276d44b020 to your computer and use it in GitHub Desktop.
Save salamcast/ed022d187ed847593bc68b276d44b020 to your computer and use it in GitHub Desktop.
extract batocera plus image to .pc folder
#!/bin/bash
#
# #############################################################
# these work in batocera plus, will need to be edited further for regular batocera
#
# https://wiki.batocera.org/systems:windows
# https://wiki.batocera.org/systems:mugen
#
# edit the autorun.cmd might need more editing to work
# after you can compress them into a squashfs
# #############################################################
name="$(basename "$1" '.plus').pc"
echo -e "\n\n#########################\n\n"
echo $name
echo -e "\n\n#########################\n\n"
sudo mount -o loop "$1" /mnt
mkdir "$name"
rsync -avz /mnt/* "$name/"
sudo umount /mnt
cat "$name/batocera.plus" | grep exec | sed 's/exec\ wine\ /CMD=/' > "$name/autorun.cmd"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment