Skip to content

Commit

Permalink
Now only copies files required for the datapack
Browse files Browse the repository at this point in the history
  • Loading branch information
antD97 committed Jun 13, 2022
1 parent f374d59 commit 38d9d9a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/src/main/kotlin/shorthandcommands/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,14 @@ fun main() {

// copy the source project directory
println("Copying source project...")
projDir.copyDir(transformedProjDir, projFunctionsDirs)

transformedProjDir.mkdir()
projPackFile.copyTo(transformedProjDir.resolve(projPackFile.name))

val projPackPngFile = projDir.listFiles().find { it.name == "pack.png" && it.isFile }
projPackPngFile?.copyTo(transformedProjDir.resolve(projPackPngFile.name))

projDataDir.copyDir(transformedProjDir.resolve("data"), projFunctionsDirs)

// transform function directories
for (functionDir in projFunctionsDirs) {
Expand Down

0 comments on commit 38d9d9a

Please sign in to comment.