Преглед изворни кода

Wrap external subtitles when available

Zachary Kotlarek пре 14 година
родитељ
комит
16fd30c691
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      recode

+ 5 - 1
recode

@@ -85,9 +85,13 @@ else
 	fi
 fi
 
-# Remove the input file if all is well
+# Remove the input file(s) if all is well
 if [ $KEEP_IN -eq 0 ]; then
 	rm -f "${IN}"
+	SRT="`echo "${IN}" | sed 's%\.[^\.]*$%%'`.srt"
+	if [ -e "${SRT}" ]; then
+		rm -f "${SRT}"
+	fi
 else
 	echo -e "`basename "${0}"`: Delayed error: Refusing to delete input file.\n" 1>&2
 fi