forked from Satty-org/Satty
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
59 lines (53 loc) · 1.58 KB
/
build.rs
File metadata and controls
59 lines (53 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#[allow(dead_code)]
use std::fs;
use std::io;
use clap::CommandFactory;
use clap_complete::{generate_to, Shell};
use clap_complete_fig::Fig;
use clap_complete_nushell::Nushell;
use satty_cli::command_line;
fn main() -> Result<(), io::Error> {
let cmd = &mut command_line::CommandLine::command();
let bin = "satty";
let out = "completions";
fs::create_dir_all(out)?;
generate_to(Shell::Bash, cmd, bin, out)?;
generate_to(Shell::Fish, cmd, bin, out)?;
generate_to(Shell::Zsh, cmd, bin, out)?;
generate_to(Shell::Elvish, cmd, bin, out)?;
generate_to(Nushell, cmd, bin, out)?;
generate_to(Fig, cmd, bin, out)?;
relm4_icons_build::bundle_icons(
"icon_names.rs",
Some("com.gabm.satty"),
None,
None::<&str>,
[
"pen-regular",
"color-regular",
"cursor-regular",
"number-circle-1-regular",
"drop-regular",
"highlight-regular",
"arrow-redo-filled",
"arrow-undo-filled",
"recycling-bin",
"save-regular",
"save-multiple-regular",
"copy-regular",
"text-case-title-regular",
"text-font-regular",
"minus-large",
"checkbox-unchecked-regular",
"circle-regular",
"crop-filled",
"arrow-up-right-filled",
"rectangle-landscape-regular",
"paint-bucket-filled",
"paint-bucket-regular",
"page-fit-regular",
"resize-large-regular",
],
);
Ok(())
}