Correct spiget handling of jars that contain jars (#1462)

This commit is contained in:
Geoff Bourne authored and GitHub committed 2022-04-09 22:02:20 -05:00
1 parent 513492192b
commit 4af80debe2
3 files changed
+6 -5

No files matched your search

+4 -4
View File
@@ -101,13 +101,13 @@ downloadResourceFromSpiget() {
log "ERROR: failed to retrieve file type of resource $resource"
exit 1
fi
if containsJars "${outfile}"; then
if containsPlugin "${outfile}"; then
log "Moving resource ${resource} into plugins"
mv "$outfile" /data/plugins
elif containsJars "${outfile}"; then
log "Extracting contents of resource ${resource} into plugins"
extract "$outfile" /data/plugins
rm "$outfile"
elif containsPlugin "${outfile}"; then
log "Moving resource ${resource} into plugins"
mv "$outfile" /data/plugins
else
log "ERROR: file for resource ${resource} has an unexpected file type: ${fileType}"
exit 2