-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a fill_template script (#77)
Hi. I think this template project is a wonderful idea to play around with egui for ealuationa nd eventually starting something real with it. But I found it kind of cumbersome to fill in the template consistently over all the files, so I wrote this little script I would like to share, in case it is deemed useful.
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
echo "To fill the template tell me your egui project crate name: " | ||
|
||
read crate | ||
|
||
echo "To fill the template tell me your name (for author in Cargo.toml): " | ||
|
||
read name | ||
|
||
echo "To fill the template tell me your e-mail address (also for Cargo.toml): " | ||
|
||
read email | ||
|
||
echo "Patching files..." | ||
|
||
sed -i "s/eframe_template/$crate/g" Cargo.toml | ||
sed -i "s/eframe_template/$crate/g" src/main.rs | ||
sed -i "s/eframe template/$crate/g" index.html | ||
sed -i "s/eframe_template/$crate/g" assets/sw.js | ||
sed -i "s/Emil Ernerfeldt/$name/g" Cargo.toml | ||
sed -i "s/[email protected]/$email/g" Cargo.toml | ||
|
||
echo "Done." | ||
|