feat: cargo genreate
This commit is contained in:
parent
fc16497ceb
commit
ce7e64f4dd
8 changed files with 112 additions and 551 deletions
25
pre.rhai
Normal file
25
pre.rhai
Normal file
|
@ -0,0 +1,25 @@
|
|||
let license = variable::get("license").to_upper();
|
||||
while switch license {
|
||||
"GLWTPL" => {
|
||||
file::delete("LICENSE-MIT");
|
||||
file::delete("LICENSE-GPL3");
|
||||
file::rename("LICENSE-GLWTPL", "LICENSE");
|
||||
false
|
||||
}
|
||||
"MIT" => {
|
||||
file::delete("LICENSE-GLWTPL");
|
||||
file::delete("LICENSE-GPL3");
|
||||
file::rename("LICENSE-MIT", "LICENSE");
|
||||
false
|
||||
}
|
||||
"GPL3" => {
|
||||
file::delete("LICENSE-GLWTPL");
|
||||
file::delete("LICENSE-MIT");
|
||||
file::rename("LICENSE-GPL3", "LICENSE");
|
||||
false
|
||||
}
|
||||
_ => true,
|
||||
} {
|
||||
license = variable::prompt("License?", "MIT", ["MIT", "GPL3", "GLWTPL"]);
|
||||
}
|
||||
variable::set("license", license)
|
Loading…
Add table
Add a link
Reference in a new issue