Created
July 19, 2019 07:35
-
-
Save rkok/4a6291af88806067b545d1a1f233ed2f to your computer and use it in GitHub Desktop.
Bare-bones m3u generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################# | |
# mkm3u.sh - Bare-bones m3u generator | |
# Usage: | |
# ./mkm3u.sh | |
# Setup: | |
# 1. Supply INPATHS. Paths which are relative | |
# to this script will result in relative paths in the m3u | |
# 2. (Optional) Edit file extensions "mp3|flac|xm|s3m|mod|it" | |
################################################################# | |
INPATHS=' | |
path1 | |
path2 | |
' | |
for INPATH in $INPATHS; do | |
echo "[$(date)] Finding mp3/flac/etc in $INPATH ..." | |
find $INPATH | grep -iE '\.(mp3|flac|xm|s3m|mod|it)$' >> "all.m3u.tmp" | |
done | |
echo "[$(date)] Saving to all.m3u" | |
mv "all.m3u.tmp" "all.m3u" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment