I use Homebrew for package management, so the instructions here work with that. You could probably get p7zip and atool another way if you want.
- install p7zip with homebrew:
brew install p7zip
- install atool with homebrew:
brew install atool
- extract individual files from .7z archives to current directory:
atool -X . -e -E *.7z
- delete or move the .7z files:
rm *.7z
- archive each file into its own ZIP archive using
find
andatool
:find . -d 1 -type f -exec atool -a -F 7z -E -e {} ';'
- delete the uncompressed rom files. They should have a common file extension, which you'll need to change depending on the ROM type. For example, I needed to delete a bunch of .gb and .gbc files:
rm *.gb; rm *.gbc