diff --git a/multimedia/subrip/Makefile b/multimedia/subrip/Makefile index 80edd9f0fde..3a9b356ad43 100644 --- a/multimedia/subrip/Makefile +++ b/multimedia/subrip/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 2007/01/22 13:57:53 espie Exp $ +# $OpenBSD: Makefile,v 1.3 2007/01/22 17:43:10 espie Exp $ COMMENT= "extract subtitles from dvds" DISTNAME= ogmrip-0.10.0 -PKGNAME= subrip-0.10.0 +PKGNAME= subrip-0.10.0p0 CATEGORIES= multimedia converters MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ogmrip/} diff --git a/multimedia/subrip/files/subrip b/multimedia/subrip/files/subrip index 4c8ea5312d5..31626deb652 100644 --- a/multimedia/subrip/files/subrip +++ b/multimedia/subrip/files/subrip @@ -1,5 +1,5 @@ #! /bin/sh -# $OpenBSD: subrip,v 1.1.1.1 2007/01/22 13:55:42 espie Exp $ +# $OpenBSD: subrip,v 1.2 2007/01/22 17:43:10 espie Exp $ # # Copyright (c) 2007 Marc Espie # @@ -36,9 +36,9 @@ fi set -e set -- $args -for i +while [ $# -ge 1 ] do - case "$i" in + case "$1" in -s) sidlist="$sidlist $2"; shift; shift;; -d) @@ -55,10 +55,12 @@ do gextra="$gextra $2";shift; shift;; --) shift; break;; + *) + break;; esac done -if [ $# -gt 0 ]; then +if [ $# -ge 1 ]; then output=$1 else output=subtitle @@ -117,6 +119,7 @@ $keep || rm -f $mytmp/*.pgm for sid in $sidlist do - srttool -s <$mytmp/z$sid.srtx >$output.$sid + real=`echo $output|sed -e "s/%d/$sid/"` + srttool -s <$mytmp/z$sid.srtx >$real.srt done $keep || rm -rf $mytmp diff --git a/multimedia/subrip/files/subrip.1 b/multimedia/subrip/files/subrip.1 index 642584c5d96..5d129a73f57 100644 --- a/multimedia/subrip/files/subrip.1 +++ b/multimedia/subrip/files/subrip.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: subrip.1,v 1.1.1.1 2007/01/22 13:55:42 espie Exp $ +.\" $OpenBSD: subrip.1,v 1.2 2007/01/22 17:43:10 espie Exp $ .\" Public domain .Dd January 20, 2007 .Dt SUBRIP 1 @@ -26,7 +26,11 @@ and passes them to .Xr gocr 1 for conversion into srt files. The resulting files are named -.Pa output. . +.Pa output.srt , +where a +.Sq %d +in output is replaced with the subtitle stream number +.Ar sid . .Pp .Nm is a simple shell-script that acts as a front-end and can be @@ -80,9 +84,11 @@ to store user-supplied information to help in character recognition. .Nm stores temporary files into a temporary subdirectory of .Va TMPDIR , -or +or of .Pa /tmp -if not set. +if +.Va TMPDIR +is not set. .Sh SEE ALSO .Xr gocr 1 , .Xr mencoder 1 ,