summaryrefslogtreecommitdiffstats
path: root/bin/ogg2mp3
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-11-08 15:42:54 +0100
committerlassulus <lass@aidsballs.de>2015-11-08 15:42:54 +0100
commit094789f9250531087b630e92324d3b81b28a881d (patch)
tree18a8a750c71eaf2b5d0c383e3ee8e1034c0b2879 /bin/ogg2mp3
parent533d789a1a549bb8fb1aac940a0d8d6ed36e8c38 (diff)
add ogg2mp3 converter
Diffstat (limited to 'bin/ogg2mp3')
-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