summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ogg2mp315
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/ogg2mp3 b/bin/ogg2mp3
new file mode 100755
index 0000000..1fbf414
--- /dev/null
+++ b/bin/ogg2mp3
@@ -0,0 +1,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