echo"CurseForge still requires a fallback TOC file (\"$package.toc\") when using multiple TOC files.">&2
exit 1
fi
if [[ -n "$split" ]]; then
if [[ "${toc_interfaces[*]}" != *":"* ]]; then
echo "Creating TOC files is enabled but there is only one TOC interface version per file?" >&2
...
...
@@ -1659,6 +1623,7 @@ copy_directory_tree() {
if [ ! -d "$_cdt_destdir" ]; then
mkdir -p "$_cdt_destdir"
fi
# Create a "find" command to list all of the files in the current directory, minus any ones we need to prune.
_cdt_find_cmd="find ."
# Prune everything that begins with a dot except for the current directory ".".
...
...
@@ -1671,7 +1636,9 @@ copy_directory_tree() {
esac
# Print the filename, but suppress the current directory ".".
_cdt_find_cmd+=" -o \! -name \".\" -print"
( cd "$_cdt_srcdir" && eval "$_cdt_find_cmd" ) | while read -r file; do
local file
while read -r file; do # <( cd "$_cdt_srcdir" && eval "$_cdt_find_cmd" )
file=${file#./}
_cdt_source_file="$_cdt_srcdir/$file"
if [ -f "$_cdt_source_file" ]; then
...
...
@@ -1695,14 +1662,23 @@ copy_directory_tree() {
if [ -n "$_cdt_skip_copy" ]; then
echo " Ignoring: $file"
else
dir=${file%/*}
if [ "$dir" != "$file" ]; then
mkdir -p "$_cdt_destdir/$dir"
_cdt_subdir=${file%/*}
if [ "$_cdt_subdir" != "$file" ]; then
mkdir -p "$_cdt_destdir/$_cdt_subdir"
fi
# Check for marked hard embedded libraries
_cdt_external_slug=
if [[ $_cdt_source_file == *".lua" ]] && _cdt_external_slug=$(grep-Po"(?i)(?<=@)curseforge-project-slug[[:space:]]*:[[:space:]]*[^@]+(?=@)""$_cdt_source_file"); then
if ! jq -e --arg v "$version_name" 'map(select(.name == $v)) | length > 0' <<< "$_cf_versions" &>/dev/null; then
if ! jq -e --arg v "$version_name" --argjson t "$game_id" 'map(select(.gameVersionTypeID == $t and .name == $v)) | length > 0' <<< "$_cf_versions" &>/dev/null; then
# no match, so grab the next highest version (try to avoid testing versions)
version_name=$(echo"$_cf_versions" | jq -r--arg v "$version_name"--argjson t "$game_id"'map(select(.gameVersionTypeID == $t and .name < $v)) | max_by(.id) | .name // empty')
if [[ -z $version_name ]]; then
...
...
@@ -3012,7 +3004,7 @@ upload_github() {
if [[ -z $skip_upload && -n $archive && -s $archive ]]; then
if ! hash jq &>/dev/null; then
if ! command -v jq &>/dev/null; then
echo "Skipping upload because \"jq\" was not found."