mirror of
https://github.com/Pagwin-Fedora/ppi.git
synced 2025-07-19 06:45:41 +00:00
project rename and using project name instead of hardcoded value for config dir
This commit is contained in:
parent
5d04294dca
commit
ee5bec00e9
3 changed files with 16 additions and 16 deletions
24
Cargo.lock
generated
24
Cargo.lock
generated
|
@ -306,6 +306,18 @@ version = "0.3.25"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
|
checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ppi"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"clap",
|
||||||
|
"dirs",
|
||||||
|
"git2",
|
||||||
|
"rlua",
|
||||||
|
"serde",
|
||||||
|
"toml",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro-error"
|
name = "proc-macro-error"
|
||||||
version = "1.0.4"
|
version = "1.0.4"
|
||||||
|
@ -339,18 +351,6 @@ dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "project_init"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"clap",
|
|
||||||
"dirs",
|
|
||||||
"git2",
|
|
||||||
"rlua",
|
|
||||||
"serde",
|
|
||||||
"toml",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.21"
|
version = "1.0.21"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
[package]
|
[package]
|
||||||
name = "project_init"
|
name = "ppi"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "3.2.22", features = ["derive"] }
|
clap = { version = "3.2.22", features = ["derive", "cargo"] }
|
||||||
dirs = "4.0.0"
|
dirs = "4.0.0"
|
||||||
git2 = "0.15.0"
|
git2 = "0.15.0"
|
||||||
rlua = "0.19.4"
|
rlua = "0.19.4"
|
||||||
|
|
|
@ -22,7 +22,7 @@ pub fn main() {
|
||||||
let mut buf = String::new();
|
let mut buf = String::new();
|
||||||
let _ = std::fs::File::open(
|
let _ = std::fs::File::open(
|
||||||
{let mut n = dirs::config_dir().expect("no config dir so edit the source code to make it work buddy");
|
{let mut n = dirs::config_dir().expect("no config dir so edit the source code to make it work buddy");
|
||||||
n.push("pag-project-init/config.toml");
|
n.push(clap::crate_name!().to_owned() + "/config.toml");
|
||||||
n
|
n
|
||||||
}).expect("error opening file").read_to_string(&mut buf);
|
}).expect("error opening file").read_to_string(&mut buf);
|
||||||
buf
|
buf
|
||||||
|
@ -34,7 +34,7 @@ pub fn main() {
|
||||||
{
|
{
|
||||||
let scripts = scripts.keys().map(String::clone).collect::<HashSet<String>>();
|
let scripts = scripts.keys().map(String::clone).collect::<HashSet<String>>();
|
||||||
let skeletons = skeletons.keys().map(String::clone).collect::<HashSet<String>>();
|
let skeletons = skeletons.keys().map(String::clone).collect::<HashSet<String>>();
|
||||||
if scripts.union(&skeletons).count() > 0 {
|
if scripts.intersection(&skeletons).count() > 0 {
|
||||||
panic!("Overlap between skeletons and scripts");
|
panic!("Overlap between skeletons and scripts");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue