예제 #1
0
        public static Bash RemoveDirectory(PathName directory)
        {
            var bash = new Bash()
                       .Command($"rm --recursive --force --verbose \"{directory}\"")
                       .WithProgress()
            ;

            return(bash.Run());
        }
예제 #2
0
        public static Bash TarExtract(PathName archivePath, PathName extractPath)
        {
            var bash = new Bash()
                       .Command($"tar --extract --verbose --owner=0 --group=0 --file \"{archivePath}\"")
                       .Directory(extractPath)
                       .WithProgress()
            ;

            return(bash.Run());
        }
예제 #3
0
        public static Bash Checker()
        {
            var bash = new Bash()
                       .Command($"env")
                       .WithEnviroment(env =>
            {
                env["PATH"] = "/bin:/usr/bin:/root/LiFo/bin";
                env.Remove("PROMPT_COMMAND");
                env.Remove("PS1");
            })
                       .Run();

            bash.Run();

            foreach (var output in bash.Outputs)
            {
                Terminal.WriteLine(output);
            }

            return(bash);
        }