blob: dae667b59d0cc194d3130749dd84ac3909fae4c8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh
set -xe
music_urls_file="${HOME}/.config/music/urls"
music_path="${HOME}/music"
music_album_list_file="$(mktemp)"
find "${music_path}" -maxdepth 1 -type d -not -path "${music_path}" -not -name ".*" \
| sort \
| xargs -I {} basename {} \
> "${music_album_list_file}"
grep -v "^http" "${music_urls_file}" \
| grep -v "^#" \
| tr -s "\n" \
| sort \
| uniq \
| diff - "${music_album_list_file}" \
| grep -e "^>" -e "^<" \
| sort -V
rm "${music_album_list_file}"
|