mirror of
https://github.com/seriocomedy/ShiftOS-C-.git
synced 2025-01-22 10:41:52 -05:00
SUPPORTS BASH bash
This commit is contained in:
parent
fd9b6b65ff
commit
65d20ae4aa
2 changed files with 27 additions and 42 deletions
|
@ -1561,6 +1561,15 @@ public void cmd_echo(String[] args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cmd_bash(String[] args)
|
||||||
|
{
|
||||||
|
Process p = new Process();
|
||||||
|
p.StartInfo.FileName = "powershell";
|
||||||
|
p.StartInfo.Arguments = "C:\\ShiftOS\\bin\\bash.exe";
|
||||||
|
p.StartInfo.WorkingDirectory = current_dir;
|
||||||
|
p.Start();
|
||||||
|
}
|
||||||
|
|
||||||
public void cmd_default(String[] args)
|
public void cmd_default(String[] args)
|
||||||
{
|
{
|
||||||
if (API.OpenProgram(args[0]) == false)
|
if (API.OpenProgram(args[0]) == false)
|
||||||
|
@ -1615,48 +1624,13 @@ public void cmd_default(String[] args)
|
||||||
}
|
}
|
||||||
if (done == false)
|
if (done == false)
|
||||||
{
|
{
|
||||||
// This runs LUA and EXE Applications
|
// This runs EXE Applications like Core Utils
|
||||||
// Created By Carver Harrison (@carverh)
|
// Created By Carver Harrison (@carverh)
|
||||||
if (File.Exists("C:\\ShiftOS\\LuaApps\\" + args[0] + ".lua"))
|
wrongcommand();
|
||||||
{
|
}
|
||||||
string lp = "C:\\ShiftOS\\LuaApps\\" + args[0] + ".lua";
|
else
|
||||||
WriteLine(lp);
|
{
|
||||||
var l = new LuaInterpreter(lp);
|
wrongcommand();
|
||||||
}
|
|
||||||
else if (File.Exists("C:\\ShiftOS\\bin\\" + args[0] + ".exe"))
|
|
||||||
{
|
|
||||||
bool isFirstArg = true;
|
|
||||||
string exeArgs = "";
|
|
||||||
foreach (string arg in args)
|
|
||||||
{
|
|
||||||
if (!isFirstArg)
|
|
||||||
{
|
|
||||||
exeArgs = exeArgs + " " + arg;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
isFirstArg = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string lp = "C:\\ShiftOS\\bin\\" + args[0] + ".exe";
|
|
||||||
Process p = new Process();
|
|
||||||
p.StartInfo.Arguments = exeArgs;
|
|
||||||
p.StartInfo.UseShellExecute = false;
|
|
||||||
p.StartInfo.RedirectStandardOutput = true;
|
|
||||||
p.StartInfo.FileName = lp;
|
|
||||||
p.StartInfo.CreateNoWindow = true;
|
|
||||||
p.StartInfo.ErrorDialog = false;
|
|
||||||
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
|
||||||
p.StartInfo.WorkingDirectory = current_dir;
|
|
||||||
p.Start();
|
|
||||||
|
|
||||||
WriteLine(p.StandardOutput.ReadToEnd());
|
|
||||||
p.WaitForExit();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wrongcommand();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1685,6 +1659,16 @@ public void cmd_histacom_timedistorter(String[] args)
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region RunEXE By Carver Harrison
|
||||||
|
/// <summary>
|
||||||
|
/// RunExe 1.1
|
||||||
|
/// This will run .exe files inside of /bin
|
||||||
|
/// Created By Carver Harrison (@carverh)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args">string[] args</param>
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
private void StartChoice1EndStory()
|
private void StartChoice1EndStory()
|
||||||
{
|
{
|
||||||
var t = new System.Windows.Forms.Timer();
|
var t = new System.Windows.Forms.Timer();
|
||||||
|
|
|
@ -3,9 +3,10 @@ ShiftOS #VER#
|
||||||
== Developers ==
|
== Developers ==
|
||||||
Michael VanOverbeek
|
Michael VanOverbeek
|
||||||
Philip Adams
|
Philip Adams
|
||||||
|
Carver Harrison
|
||||||
|
William
|
||||||
GabrielTK
|
GabrielTK
|
||||||
PCSource
|
PCSource
|
||||||
Carver Harrison
|
|
||||||
AShifter
|
AShifter
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue