allow script reading from stdin

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1137 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 26 years ago
parent 054a4eeccb
commit f4d9bae9f6
  1. 6
      jode/jode/obfuscator/Main.java.in

@ -28,6 +28,7 @@ import gnu.getopt.Getopt;
import java.lang.reflect.Modifier;
import java.io.PrintWriter;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.io.IOException;
import @COLLECTIONS@.Collections;
@ -151,8 +152,11 @@ public class Main {
try {
String filename = params[g.getOptind()];
ScriptParser parser = new ScriptParser
(new FileReader(params[g.getOptind()]));
(filename.equals("-")
? new InputStreamReader(System.in)
: new FileReader(filename));
parser.parseOptions(bundle);
} catch (IOException ex) {
GlobalOptions.err.println

Loading…
Cancel
Save