From 9218b163f2d8bc965b853ed9fc9e13d15a703456 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 17 Aug 2015 16:16:24 +0200 Subject: make target mutable --- bin/ogg-maker | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'bin/ogg-maker') diff --git a/bin/ogg-maker b/bin/ogg-maker index 4528df2..82e2f8c 100755 --- a/bin/ogg-maker +++ b/bin/ogg-maker @@ -2,13 +2,15 @@ filename="$1" outname=$(echo $1 | sed 's/^\(.*\)\..*/\1/').ogg if [ "$filename" == "$outname" ]; then - ffmpeg -i $filename tmp_$filename - sox --norm=3 $filename tmp_$filename silence 1 0.1 1% reverse silence 1 0.1 1% reverse rate 44100 - vorbisgain ${filename}tmp - mv tmp_$filename $filename + ffmpeg -i $filename tmp_$outname + sox --norm=3 tmp_$outname tmp2_$outname silence 1 0.1 1% reverse silence 1 0.1 1% reverse rate 44100 + rm tmp_$outname + vorbisgain tmp2_$outname + mv tmp2_$outname $outname else - ffmpeg -i $filename $outname - sox --norm=-3 $filename $outname silence 1 0.1 1% reverse silence 1 0.1 1% reverse rate 44100 + ffmpeg -i $filename tmp_$outname + sox --norm=-3 tmp_$outname $outname silence 1 0.1 1% reverse silence 1 0.1 1% reverse rate 44100 + rm tmp_$outname vorbisgain $outname rm $filename fi -- cgit v1.2.3