add src-space/* and clear src files
This commit is contained in:
1 parent
2f2e0759fd
commit
9e38b7ca63
13 files changed
+90
-73
No files matched your search
Generated
+7
@@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "srcrs"
|
||||
version = "0.1.0"
|
||||
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "srcrs"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 2
|
||||
@@ -0,0 +1,18 @@
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
let target_dir = env::var("CARGO_TARGET_DIR").unwrap_or_else(|_| "target".to_string());
|
||||
let profile = env::var("PROFILE").unwrap();
|
||||
let exe_name = env::var("CARGO_PKG_NAME").unwrap();
|
||||
|
||||
println!("cargo::warning={}", profile);
|
||||
|
||||
let target_path = Path::new(&target_dir).join(&profile).join(&exe_name);
|
||||
let dest_path = Path::new("../../build").join("rs.out");
|
||||
|
||||
if target_path.exists() {
|
||||
fs::copy(&target_path, &dest_path).expect("Failed to copy executable");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user