Skip to content

Commit

Permalink
srtzip: Ignore the output file in any list of files
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Aug 26, 2015
1 parent cb7fe8d commit 24eae76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srtzip.pike
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ int main(int argc,array(string) argv)
else if (sscanf(arg,"--%s",string key)) opt[key]="1";
else files+=({arg});

string outfn=files[-1]; files=files[..<1];
string outfn=files[-1]; files=files[..<1]-({outfn});
if (sizeof(files)<2) exit(0,"USAGE: pike %s input1.srt input2.srt [input3.srt...] output.srt\nAttempts to 'zip' the inputs into the output.\n");
write("Combining to %s:\n%{\t%s\n%}",outfn,files);
array(array(string)) inputs=String.trim_all_whites(utf8_to_string(Stdio.read_file(files[*])[*])[*])[*]/"\n\n";
Expand Down

0 comments on commit 24eae76

Please sign in to comment.