summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocalvideowebencode10
1 files changed, 2 insertions, 8 deletions
diff --git a/localvideowebencode b/localvideowebencode
index 0153c2a..31844b7 100755
--- a/localvideowebencode
+++ b/localvideowebencode
@@ -150,16 +150,10 @@ done
# TODO: drop when melt 0.9.2 is stable
melt_recent=$(melt -query filter=loudness | grep -qi R128 && echo yes)
+# sanitize infiles
infiles=$*
-
-if [ -z "$infiles" ]; then
- showhelp
- exit1 "Too few parameters!"
-fi
-
-# input filename (mandatory)
infile_first=$(perl -e 'print pop @ARGV' $infiles)
-[ -e "$infile_first" ] || exit1 "Input file missing!"
+[ -e "$infile_first" ] || exit1 "Cannot read first input file \"$infile_first\"!"
# resolve stem and title (if not explicitly set)
stem=${stem:-$(basename "$infile_first" | perl -pe 's/\.[^.]*//')}