libkelp/lib/structs/
script.rs

1use serde::{Deserialize, Serialize};
2#[derive(PartialEq, Debug, Serialize, Deserialize)]
3/// A "prerun|postrun" script
4pub struct Script {
5    /// Path relative to $DOTFILES_ROOT
6    pub path: String,
7    /// If the script needs to start as root
8    pub elevated: Option<bool>,
9}
10// To make sure we can use println!("{}", script)
11impl std::fmt::Display for Script {
12    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13        write!(f, "{}", self.path)
14    }
15}