feat: cargo genreate

This commit is contained in:
DavidOnTop 2024-01-28 11:55:06 +01:00
parent fc16497ceb
commit ce7e64f4dd
No known key found for this signature in database
GPG key ID: FAB914DDC2F180EB
8 changed files with 112 additions and 551 deletions

25
pre.rhai Normal file
View 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)