diff options
author | GitHub Action <action@github.com> | 2023-07-21 10:15:53 +0000 |
---|---|---|
committer | GitHub Action <action@github.com> | 2023-07-21 10:15:53 +0000 |
commit | 4f8ca665888f10504d2995e9bed4b95ea60554c3 (patch) | |
tree | c9894a5c302d4b1665f4f6aabfc285b00f90849a /make-my-own.sh | |
parent | 2c7e371cb8d566875d767dd20c4a1287d5275b2c (diff) | |
download | SkyblockPlayersAnonymous-4f8ca665888f10504d2995e9bed4b95ea60554c3.tar.gz SkyblockPlayersAnonymous-4f8ca665888f10504d2995e9bed4b95ea60554c3.tar.bz2 SkyblockPlayersAnonymous-4f8ca665888f10504d2995e9bed4b95ea60554c3.zip |
Initialize template repository proper
Set package name to com.github.romangraef.skyblockplayersanonymous
Set project name to SkyblockPlayersAnonymous
Set modid to skyblockplayersanonymous
Diffstat (limited to 'make-my-own.sh')
-rwxr-xr-x | make-my-own.sh | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/make-my-own.sh b/make-my-own.sh deleted file mode 100755 index ff8f1ec..0000000 --- a/make-my-own.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -print_help() { - echo "$0 <new package name> <project name> <modid>" -} - -if [ "$#" -ne "3" ]; then - print_help - exit 0 -fi - -base=$(dirname "$(readlink -f "$0")") -echo "Updating $base" -package_name="$1" -project_name="$2" -modid="$3" -package_dir=$(echo "$package_name" | tr . /) -echo "Setting package name to $package_name" -echo "Setting project name to $project_name" -echo "Setting package dir to $package_dir" -echo "Setting mod id to $modid" -( - set -x - find "$base"/src/main -type f -exec sed -i s/examplemod/"$modid"/g\;s/com.example/"$package_name"/g {} + - sed -i s/com.example/"$package_name"/g\;s/examplemod/"$modid"/g "$base"/gradle.properties - sed -i s/examplemod/"$project_name"/g "$base"/settings.gradle.kts - mkdir -p "$base"/src/main/java/"$package_dir" - mkdir -p "$base"/src/main/kotlin/"$package_dir" - mv "$base"/src/main/java/com/example/* "$base"/src/main/java/"$package_dir" - mv "$base"/src/main/kotlin/com/example/* "$base"/src/main/kotlin/"$package_dir" - mv "$base"/src/main/resources/mixins.examplemod.json "$base"/src/main/resources/mixins."$modid".json - rm "$base"/.github/workflows/init.yml - rm "$(readlink -f $0)" -) -echo "All done" -echo "Now go commit those changes" |