Package bear.vcs

Examples of bear.vcs.CommandLineOperator


        strings.add(new CommandLineOperator(";"));
        return this;
    }

    public CommandLine<T, SCRIPT> redirectFrom(String path) {
        strings.add(new CommandLineOperator("<" + path));
        return this;
    }
View Full Code Here


        strings.add(new CommandLineOperator("<" + path));
        return this;
    }

    public CommandLine<T, SCRIPT> redirectTo(String path) {
        strings.add(new CommandLineOperator(">" + path));
        return this;
    }
View Full Code Here

    public CommandLine<T, SCRIPT> addRaw(String format, boolean force, String... args) {
        if(format.contains("rm ") && !force){
            throw new BearException("rm in raw mode is forbidden. Use rmLine(...) or rm(...) to avoid deleting system libs.");
        }
        strings.add(new CommandLineOperator(String.format(format, args)));
        return this;
    }
View Full Code Here

        strings.add(new CommandLineOperator(String.format(format, args)));
        return this;
    }

    public CommandLine<T, SCRIPT> addRaw(String s) {
        strings.add(new CommandLineOperator(s));
        return this;
    }
View Full Code Here

        strings.add(new CommandLineOperator(s));
        return this;
    }

    public CommandLine<T, SCRIPT> stty() {
        strings.add(new CommandLineOperator("stty -echo;"));
        return this;
    }
View Full Code Here

        strings.add(new CommandLineOperator("stty -echo;"));
        return this;
    }

    public CommandLine<T, SCRIPT> sudo() {
        strings.add(new CommandLineOperator("stty -echo; sudo "));
        return this;
    }
View Full Code Here

    public CommandLine<T, SCRIPT> timeoutMin(long timeoutMin) {
        return timeoutSec(60 * timeoutMin);
    }

    public CommandLine<T, SCRIPT> bash() {
        strings.add(new CommandLineOperator("bash -c"));
        return this;
    }
View Full Code Here

        strings.add(new CommandLineOperator("bash -c"));
        return this;
    }

    public CommandLine<T, SCRIPT> setVar(String k, String v) {
        strings.add(new CommandLineOperator("export " + k + "=" + v + "; "));
        return this;
    }
View Full Code Here

TOP

Related Classes of bear.vcs.CommandLineOperator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.