Skip to content

Commit

Permalink
Merge pull request #103 from BigWigsMods/fix-distinct-toc
Browse files Browse the repository at this point in the history
Use distinct TOC files
  • Loading branch information
p3lim authored Aug 26, 2021
2 parents ff497dd + a184d29 commit 4a3ceab
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,27 @@ if [[ ! -f "$topdir/$toc_path" && -f "$topdir/$package/$toc_path" ]]; then
toc_path="$package/$toc_path"
fi

# Use distinct TOC file if it exists
if [[ "$game_type" == "classic" ]]; then
if [[ -f "$topdir/$package-Classic.toc" ]]; then
toc_path="$package-Classic.toc"
elif [[ ! -f "$topdir/$package-Classic.toc" && -f "$topdir/$package/$package-Classic.toc" ]]; then
toc_path="$package/$package-Classic.toc"
fi
elif [[ "$game_type" == "bcc" ]]; then
if [[ -f "$topdir/$package-BCC.toc" ]]; then
toc_path="$package-BCC.toc"
elif [[ ! -f "$topdir/$package-BCC.toc" && -f "$topdir/$package/$package-BCC.toc" ]]; then
toc_path="$package/$package-BCC.toc"
fi
elif [[ "$game_type" == "retail" ]]; then
if [[ -f "$topdir/$package-Mainline.toc" ]]; then
toc_path="$package-Mainline.toc"
elif [[ ! -f "$topdir/$package-Mainline.toc" && -f "$topdir/$package/$package-Mainline.toc" ]]; then
toc_path="$package/$package-Mainline.toc"
fi
fi

if [[ ! -f "$topdir/$toc_path" ]]; then
echo "Could not find an addon TOC file. In another directory? Make sure it matches the 'package-as' in .pkgmeta" >&2
exit 1
Expand Down

0 comments on commit 4a3ceab

Please sign in to comment.