Skip to content

Commit da1b052

Browse files
authored
datapack: allow copying from directory (#3259)
1 parent abb3af0 commit da1b052

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/start-setupDatapack

+7-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@ if [[ "$DATAPACKS" ]]; then
4141
exit 2
4242
fi
4343
elif [[ -d "$i" ]]; then
44-
log "Copying datapacks from $i ..."
45-
cp "$i"/*.zip "${out_dir}"
44+
if [[ -f "$i/pack.mcmeta" ]]; then
45+
log "Copying datapack from $i"
46+
cp -r "$i" "${out_dir}"
47+
else
48+
log "Copying datapacks from $i ..."
49+
cp "$i"/*.zip "${out_dir}"
50+
fi
4651
else
4752
logError "Invalid URL or path given in DATAPACKS: $i"
4853
exit 2

0 commit comments

Comments
 (0)