Last active
August 29, 2015 14:06
-
-
Save agalazis/25478eb1c67d5378f0d2 to your computer and use it in GitHub Desktop.
build all plalysts from directories that contain music
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 | |
#asuming you hace a ~/playlists directory dedicated for this purpose | |
cd ~/ | |
rm -rf ~/playlists/* && find ~/ -name '*.mp3' | while read line ; do fn=$(echo ${line%/*}|md5sum | cut -d ' ' -f 1); [ ! -f "playlists/$fn.m3u" ] && echo "#EXTM3U" >>"playlists/$fn.m3u";echo $line>>"playlists/$fn.m3u"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment