summaryrefslogtreecommitdiffstats
path: root/bin/ogg2mp3
blob: 1fbf4148b236556284b68f6e2de5f71228b10682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh
set -euf
target_folder=${target-./}

source=$1
target_mp3=$(basename $1 | sed 's/ogg$/mp3/')

mkdir -p $target_folder

if test -e $target_folder/$target_mp3; then
  echo "already done: $target_mp3 in $target_folder" >&2
  exit
fi

ffmpeg -i $source $target_folder/$target_mp3