feat: origin filename support.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user