summaryrefslogtreecommitdiffstats
path: root/bin/ringtone
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-10 14:41:38 -0500
committerJesse Luehrs <doy@tozt.net>2018-11-10 14:43:14 -0500
commit09366721b4a5405ccd24e21c9f0c4edd25d51196 (patch)
treefd72dec2d55f51aecc1b76b01dd7ed18c1be9d87 /bin/ringtone
parent12d2a797346af8fc2908bf5d7873414811a7e9cc (diff)
downloadconf-09366721b4a5405ccd24e21c9f0c4edd25d51196.tar.gz
conf-09366721b4a5405ccd24e21c9f0c4edd25d51196.zip
various script cleanups
Diffstat (limited to 'bin/ringtone')
-rwxr-xr-xbin/ringtone21
1 files changed, 12 insertions, 9 deletions
diff --git a/bin/ringtone b/bin/ringtone
index 5c8cfe1..19dddb6 100755
--- a/bin/ringtone
+++ b/bin/ringtone
@@ -1,4 +1,6 @@
-#!/bin/bash
+#!/bin/sh
+set -eu
+set -o pipefail
if [ $# -lt 3 ]; then
echo "usage: ringtone <input> <output> <fake_video_file>"
@@ -7,11 +9,12 @@ if [ $# -lt 3 ]; then
exit 1
fi
-mencoder -ovc frameno \
- -oac mp3lame \
- -lameopts cbr:br=64 \
- -of rawaudio \
- -o $2 \
- -audiofile $1 \
- -endpos 256kb \
- $3
+mencoder \
+ -ovc frameno \
+ -oac mp3lame \
+ -lameopts cbr:br=64 \
+ -of rawaudio \
+ -o "$2" \
+ -audiofile "$1" \
+ -endpos 256kb \
+ "$3"