script works!
This commit is contained in:
parent
096df006ca
commit
ead55cfb8c
1 changed files with 13 additions and 14 deletions
|
@ -39,18 +39,15 @@ echo 'okay now some links!'
|
|||
|
||||
echo '______'
|
||||
|
||||
echo 'Mod Homepage - https://example.com/:'
|
||||
echo 'Mod Homepage - (NO HTTPS://DFASDF/) - example.com:'
|
||||
read homepage
|
||||
echo 'Mod Source - https://github.com/QuiltMC/quilt-template-mod/issues:'
|
||||
read source
|
||||
echo 'Mod Issue Tracker- https://github.com/QuiltMC/quilt-template-mod:'
|
||||
read issues
|
||||
echo 'you will have to manually edit the "source" and "issues" section of the quilt.mod.json'
|
||||
|
||||
echo '______'
|
||||
# list vars
|
||||
|
||||
echo 'OK. here is what you typed...'
|
||||
echo $modnamehr, $modnameus, $modnamecase, $uname, $website, $homepage, $soure, $issues, $websiteld, $websiteroot, $moddesc
|
||||
echo $modnamehr, $modnameus, $modnamecase, $uname, $website, $homepage, $websiteld, $websiteroot, $moddesc
|
||||
|
||||
echo '______'
|
||||
|
||||
|
@ -63,12 +60,14 @@ sed -i ./gradle.properties -e "8s/example_mod/${modnameus}/"
|
|||
|
||||
# edit namespace
|
||||
## Folders
|
||||
mv -r ./src/main/java/com/example/example_mod ./src/main/java/${websitetld}/${websiteroot}/${modnameus}
|
||||
rm -r ./src/main/java/com
|
||||
mv -r ./src/main/resources/assets/example_mod ./src/main/resources/assets/${modnameus}
|
||||
###################something is going wrong here, it doesnt know how to rename the folder?????????????
|
||||
mv ./src/main/java/com ./src/main/java/${websitetld}
|
||||
mv ./src/main/java/${websitetld}/example ./src/main/java/${websitetld}/${websiteroot}
|
||||
mv ./src/main/java/${websitetld}/${websiteroot}/example_mod ./src/main/java/${websitetld}/${websiteroot}/${modnameus}
|
||||
mv ./src/main/resources/assets/example_mod ./src/main/resources/assets/${modnameus}
|
||||
## Packages/filenames
|
||||
mv ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/ExampleMod.java ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/${modnamecase}.java
|
||||
mv ./src/main/java/example_mod.mixins.json ./src/main.java/${modnameus}.mixins.json
|
||||
mv ./src/main/resources/example_mod.mixins.json ./src/main/resources/${modnameus}.mixins.json
|
||||
|
||||
|
||||
|
||||
|
@ -87,11 +86,11 @@ sed -i ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/${modnamecase}.
|
|||
|
||||
## TitleScreenMixin
|
||||
### package
|
||||
sed -i ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/mixin/TitleScreenMixin.java -e "1s/com.example.example_mod/${websitetld}.${websiteroot}.${modnameus}.mixin/"
|
||||
sed -i ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/mixin/TitleScreenMixin.java -e "1s/com.example.example_mod/${websitetld}.${websiteroot}.${modnameus}/"
|
||||
### Main Class Import
|
||||
sed -i ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/mixin/TitleScreenMixin.java -e "3s/com.example.example_mod.ExampleMod/${websitetld}.${websiteroot}.${modnameus}/"
|
||||
sed -i ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/mixin/TitleScreenMixin.java -e "3s/com.example.example_mod.ExampleMod/${websitetld}.${websiteroot}.${modnameus}.${modnamecase}/"
|
||||
### Logger Class
|
||||
sed -i ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/mixin/TitleScreenMixin.java -e "13s/ExampleMod/${modnamecase}/"
|
||||
sed -i ./src/main/java/${websitetld}/${websiteroot}/${modnameus}/mixin/TitleScreenMixin.java -e "14s/ExampleMod/${modnamecase}/"
|
||||
|
||||
## RESOURCES (mixins.json and quilt.mod.json)
|
||||
### package name in *.mixins.json
|
||||
|
@ -108,7 +107,7 @@ sed -i ./src/main/resources/quilt.mod.json -e "9s/A short description of your mo
|
|||
### contributors section
|
||||
sed -i ./src/main/resources/quilt.mod.json -e "11s/Your name here/${uname}/"
|
||||
### homepage section
|
||||
sed -i ./src/main/resources/quilt.mod.json -e "14s/https://example.com/${homepage}/"
|
||||
sed -i ./src/main/resources/quilt.mod.json -e "14s/example.com/${homepage}/"
|
||||
### icon secion
|
||||
sed -i ./src/main/resources/quilt.mod.json -e "18s/example_mod/${modnameus}/"
|
||||
### entrypoints init section
|
||||
|
|
Loading…
Reference in a new issue