Skip to content
Myr

build.rs

This file

Path

build.rs

31 lines · 844 bytes · Rust

Last changed by

Clean up build.rssharkdpbefore adoptiona85f33c

History of this file

Take it

The walk stopped after 200 commits: lines older than cdf737b point at it.

Add `search-path` optionCasey Primozicbefore adoptioncdf737b

line 1why, one step back
1use std::fs;

Clean up include ordersharkdpbefore adoption53557ef

lines 2–3why, one step back
2
3use clap::Shell;

Add `search-path` optionCasey Primozicbefore adoptioncdf737b

lines 4–7why, one step back
4
5include!("src/app.rs");67fn main() {

Clean up build.rssharkdpbefore adoptiona85f33c

lines 8–10why, one step back
8 let min_version = "1.36";
910 match version_check::is_min_version(min_version) {

Fix build script after updatesharkdpbefore adoption9cc0c8e

line 11why, one step back
11 Some(true) => {}

Add `search-path` optionCasey Primozicbefore adoptioncdf737b

lines 12–13why, one step back
12 // rustc version too small or can't figure it out
13 _ => {

Clean up build.rssharkdpbefore adoptiona85f33c

lines 14–15why, one step back
14 eprintln!("'fd' requires rustc >= {}", min_version);
15 std::process::exit(1);

Add `search-path` optionCasey Primozicbefore adoptioncdf737b

lines 16–31why, one step back
16 }
17 }1819 let var = std::env::var_os("SHELL_COMPLETIONS_DIR").or(std::env::var_os("OUT_DIR"));20 let outdir = match var {21 None => return,22 Some(outdir) => outdir,23 };24 fs::create_dir_all(&outdir).unwrap();2526 let mut app = build_app();27 app.gen_completions("fd", Shell::Bash, &outdir);28 app.gen_completions("fd", Shell::Fish, &outdir);29 app.gen_completions("fd", Shell::Zsh, &outdir);30 app.gen_completions("fd", Shell::PowerShell, &outdir);31}