scripts/fish/flac2mp3

19 lines
324 B
Plaintext
Raw Permalink Normal View History

2019-08-18 06:26:48 -07:00
#!/usr/bin/env fish
function flac2mp3 -d 'Converts FLAC files to MP3'
for f in ./*.flac
if not ffmpeg -i "$f" -q:a 0 -vn (basename "$f" ".flac")".mp3"
echo "failed to process $f, exiting"
exit 1
end
echo "$f success"
end
read -P "success. delete files? [yn] " yn
test $yn = y
and rm ./*.flac
end
## EOF