scripts/scripts/cmds/flac2mp3

19 lines
286 B
Fish
Executable File

#!/usr/bin/env fish
# vim: syntax=fish:
function fail
echo "failed to process $f, exiting"
exit 1
end
for f in ./*.flac
ffmpeg -i "$f" -q:a 0 -vn (basename "$f" ".flac")".mp3"
or fail
echo "$f success"
end
read -P "success. delete files? [yn] " yn
test $yn = y
and rm ./*.flac