/// <summary> /// Creates a new local shell connector instance. /// </summary> public Shell() { //https://github.com/deinsoftware/toolbox#system this.NotificationSystem = ToolBox.Notification.NotificationSystem.Default; this.BridgeSystem = (Utils.CurrentOS == Utils.OS.WIN ? ToolBox.Bridge.BridgeSystem.Bat : ToolBox.Bridge.BridgeSystem.Bash); this.LocalShell = new ShellConfigurator(BridgeSystem, NotificationSystem); }
public ShellConfigurator(IBridgeSystem bridgeSystem, INotificationSystem notificationSystem = null) { if (bridgeSystem == null) { throw new ArgumentException(nameof(bridgeSystem)); } _bridgeSystem = bridgeSystem; if (notificationSystem == null) { _notificationSystem = NotificationSystem.Default; } else { _notificationSystem = notificationSystem; } if (!OS.IsWin()) { Term("chmod +x cmd.sh"); } }
public ShellConfigurator(IBridgeSystem bridgeSystem, INotificationSystem notificationSystem = null) { if (bridgeSystem == null) { throw new ArgumentException(nameof(bridgeSystem)); } _bridgeSystem = bridgeSystem; if (notificationSystem == null) { _notificationSystem = NotificationSystem.Default; } else { _notificationSystem = notificationSystem; } if (!OS.IsWin()) { Term($"chmod +x {Path.Combine(Utility.GetExecutionAssemblyPath(), "cmd.sh")}"); } }