mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-06-21 22:09:09 -04:00
Shell fixes
This commit is contained in:
@@ -43,17 +43,9 @@ public class AppInstaller {
|
||||
} else {
|
||||
targetFile = FileNames.join(
|
||||
s.getTemporaryDirectory(), localFile.getFileName().toString());
|
||||
try (CommandControl c = s.getShellDialect().getStreamFileWriteCommand(s, targetFile)
|
||||
.start()) {
|
||||
c.discardOut();
|
||||
c.discardErr();
|
||||
try (InputStream in = Files.newInputStream(localFile)) {
|
||||
in.transferTo(c.getStdin());
|
||||
}
|
||||
c.closeStdin();
|
||||
try (InputStream in = Files.newInputStream(localFile)) {
|
||||
in.transferTo(s.getShellDialect().createStreamFileWriteCommand(s, targetFile).startExternalStdin());
|
||||
}
|
||||
|
||||
s.restart();
|
||||
}
|
||||
|
||||
asset.installRemote(s, targetFile);
|
||||
|
||||
@@ -60,10 +60,10 @@ public class DesktopShortcuts {
|
||||
pc.getShellDialect().flatten(pc.getShellDialect().getMkdirsCommand(base + "/Contents/Resources")));
|
||||
|
||||
var executable = base + "/Contents/MacOS/" + name;
|
||||
pc.executeSimpleCommand(pc.getShellDialect().getTextFileWriteCommand(content, executable));
|
||||
pc.getShellDialect().createTextFileWriteCommand(pc, content, executable).execute();
|
||||
pc.executeSimpleCommand("chmod ugo+x \"" + executable + "\"");
|
||||
|
||||
pc.executeSimpleCommand(pc.getShellDialect().getTextFileWriteCommand("APPL????", base + "/PkgInfo"));
|
||||
pc.getShellDialect().createTextFileWriteCommand(pc, "APPL????", base + "/PkgInfo").execute();
|
||||
pc.executeSimpleCommand("cp \"" + icon + "\" \"" + base + "/Contents/Resources/" + name + ".icns\"");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public class ScriptHelper {
|
||||
.handle();
|
||||
|
||||
// processControl.executeSimpleCommand(type.getFileTouchCommand(file), "Failed to create script " + file);
|
||||
processControl.executeSimpleCommand(type.getTextFileWriteCommand(content, file));
|
||||
processControl.getShellDialect().createTextFileWriteCommand(processControl, content, file).execute();
|
||||
processControl.executeSimpleCommand(
|
||||
type.getMakeExecutableCommand(file), "Failed to make script " + file + " executable");
|
||||
return file;
|
||||
|
||||
Reference in New Issue
Block a user