feat: origin filename support.

This commit is contained in:
2026-01-04 03:12:57 +08:00
parent 5ce56bda36
commit ae0ba21b11
6 changed files with 97 additions and 19 deletions
+5
View File
@@ -20,6 +20,11 @@ impl ShellScript {
self.lines.push(format!("{}=\"{}\"", name, escaped));
}
pub fn add_variable_str(&mut self, name: &str, value: &str) {
let escaped = value.replace('"', r#"\""#).replace('$', r#"\$"#);
self.lines.push(format!("{}=\"{}\"", name, escaped));
}
pub fn add_command(&mut self, command: &str) {
self.lines.push(command.to_string());
}