Created
June 21, 2013 01:54
-
-
Save panzi/5828322 to your computer and use it in GitHub Desktop.
Makes a playlist of all audio files in directory and all descendant directories. It detects audio files just by some well known file name extensions.
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/sh | |
dir="$1" | |
playlist="$2" | |
if [ "$playlist" = "" ]; then | |
playlist=playlist.m3u | |
fi | |
find "`readlink -f "$dir"`" -type f -and \( -iname '*.mp3' -or -iname '*.ogg' -or -iname '*.wav' -or -iname '*.flac' -or -iname '*.m4a' -or -iname '*.aac' -or -iname '*.wma' -or -iname '*.opus' \) > "$playlist" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment