public String[] buildCommandLine(FilePath script) { if(command.startsWith("#!")) { // interpreter override int end = command.indexOf('\n'); if(end<0) end=command.length(); List<String> args = new ArrayList<String>(); args.addAll(Arrays.asList(Util.tokenize(command.substring(0,end).trim()))); args.add(script.getRemote()); args.set(0,args.get(0).substring(2)); // trim off "#!" return args.toArray(new String[args.size()]); } else return new String[] { getDescriptor().getShellOrDefault(script.getChannel()), "-xe", script.getRemote()}; }
public String[] buildCommandLine(FilePath script) { if(command.startsWith("#!")) { // interpreter override int end = command.indexOf('\n'); if(end<0) end=command.length(); List<String> args = new ArrayList<String>(); args.addAll(Arrays.asList(Util.tokenize(command.substring(0,end).trim()))); args.add(script.getRemote()); args.set(0,args.get(0).substring(2)); // trim off "#!" return args.toArray(new String[args.size()]); } else return new String[] { getDescriptor().getShellOrDefault(),"-xe",script.getRemote()}; }
public String[] buildCommandLine(FilePath script) { if(command.startsWith("#!")) { // interpreter override int end = command.indexOf('\n'); if(end<0) end=command.length(); List<String> args = new ArrayList<String>(); args.addAll(Arrays.asList(Util.tokenize(command.substring(0,end).trim()))); args.add(script.getRemote()); args.set(0,args.get(0).substring(2)); // trim off "#!" return args.toArray(new String[args.size()]); } else return new String[] { getDescriptor().getShellOrDefault(),"-xe",script.getRemote()}; }
public String[] buildCommandLine(FilePath script) { if(command.startsWith("#!")) { // interpreter override int end = command.indexOf('\n'); if(end<0) end=command.length(); List<String> args = new ArrayList<String>(); args.addAll(Arrays.asList(Util.tokenize(command.substring(0,end).trim()))); args.add(script.getRemote()); args.set(0,args.get(0).substring(2)); // trim off "#!" return args.toArray(new String[args.size()]); } else return new String[] { getDescriptor().getShellOrDefault(),"-xe",script.getRemote()}; }
public String[] buildCommandLine(FilePath script) { if(command.startsWith("#!")) { // interpreter override int end = command.indexOf('\n'); if(end<0) end=command.length(); List<String> args = new ArrayList<String>(); args.addAll(Arrays.asList(Util.tokenize(command.substring(0,end).trim()))); args.add(script.getRemote()); args.set(0,args.get(0).substring(2)); // trim off "#!" return args.toArray(new String[args.size()]); } else return new String[] { getDescriptor().getShellOrDefault(script.getChannel()), "-xe", script.getRemote()}; }
public String[] buildCommandLine(FilePath script) { if (command.startsWith("#!")) { // interpreter override int end = command.indexOf('\n'); if (end < 0) { end = command.length(); } List<String> args = new ArrayList<String>(); args.addAll(Arrays.asList(Util.tokenize(command.substring(0, end).trim()))); args.add(script.getRemote()); args.set(0, args.get(0).substring(2)); // trim off "#!" return args.toArray(new String[args.size()]); } else { return new String[]{getDescriptor().getShellOrDefault(), "-xe", script.getRemote()}; } }