summaryrefslogblamecommitdiffstats
path: root/.bin/cmus-to-m3u
blob: 0eaf4a317acf0378a3b260b87e24e067fc53fe85 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                          
#!/bin/sh

set -xe

root_dir="/home/qwd/music"

test -f "${1}"
test ! -d "${2}"

echo "#EXTM3U" > "${2}"

while read -r line; do
	echo "${line}" | sed "s@${root_dir}/@@g" >> "${2}"
done < "${1}"
remember that computers suck.