Skip to content

Instantly share code, notes, and snippets.

@Rican7
Created November 12, 2020 07:54
Show Gist options
  • Save Rican7/0c09663e8fbaceaaa34282508a85d90a to your computer and use it in GitHub Desktop.
Save Rican7/0c09663e8fbaceaaa34282508a85d90a to your computer and use it in GitHub Desktop.
Builds m3u files for ROM image files (.cue, .iso)
#!/usr/bin/env sh
#
# Builds m3u files for ROM image files (.cue, .iso)
find -type f \( -iname '*(*disc*.cue' -o -iname '*(*disc*.iso' -o -iname '*(*mode*.cue' -o -iname '*(*mode*.iso' \) -exec sh -c 'echo "$(basename -- "$0")" >> "$(echo "${0%.*}" | sed "s/ (disc [0-9]\+)\| ([A-Za-z]\+ disc)\| ([A-Za-z]\+ mode)//gI")".m3u' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment