diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2023-01-14 14:47:33 +0100 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2023-01-14 14:47:33 +0100 |
commit | 23e2bfd987c430bb41bc7860c46c2f572e9e2db4 (patch) | |
tree | a9a477e11fb6dbea189835147a149e56c0f03a7f /.bin/cmus-to-m3u | |
parent | ce6be946d024aa55a15d576388d05f90be671cf2 (diff) | |
download | dots-23e2bfd987c430bb41bc7860c46c2f572e9e2db4.tar.gz |
Sat Jan 14 02:47:33 PM CET 2023
Diffstat (limited to '.bin/cmus-to-m3u')
-rwxr-xr-x | .bin/cmus-to-m3u | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.bin/cmus-to-m3u b/.bin/cmus-to-m3u new file mode 100755 index 0000000..0eaf4a3 --- /dev/null +++ b/.bin/cmus-to-m3u @@ -0,0 +1,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}" |