Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- filesexist() {
- ls $1 | grep .$2\$ | wc -l
- }
- anyexist() {
- [ `filesexist $1 $2` -gt 0 ]
- }
- replaygain() {
- if anyexist "$1" mp3
- then
- mp3gain -p -a -k -s i -o "$1"/*.mp3
- fi
- if anyexist "$1" flac
- then
- metaflac --add-replay-gain "$1"/*.flac
- fi
- }
- find -type d -newermt '-1 month' -exec replaygain {} \;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement