Replies: 1 comment
-
|
If they're just shell scripts, you can use process::Command struct to execute commands and all it needs is a string, so no external .sh files. Here is an example: use std::process::Command;
// Your awesome script, and you can put your scripts in another .rs file to organize
let script = format!{r#"
Year=`date +%Y`;
Month=`date +%m`;
echo `date`;
echo "Current year is: $Year";
echo "Current month is: $Month";
"#};
let script_output = Command::new("sh")
.args(["-c", &script])
.output()
.expect("could not run shell");You have lots of control over it such as stdin, stdout, flags, signals, etc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is the "most" trivial way to bundle i.e. *sh files for mac os builds, I still want to release a single executable...
Maybe I'm missing something obvious in the tauri.conf.json?
Beta Was this translation helpful? Give feedback.
All reactions