From d0f25968e4fc05be910dfe779e69ad93df33f532 Mon Sep 17 00:00:00 2001 From: "Eric J. Bowersox" Date: Tue, 3 Nov 2015 23:49:54 -0700 Subject: [PATCH] Beginnings of the modlist.txt system Added the mod directories with their modlist.txt files, and a script to verify that all mod list files have been downloaded. --- .gitignore | 2 ++ mods-source/client/modlist.txt | 1 + mods-source/forge/modlist.txt | 1 + mods-source/server/modlist.txt | 1 + scripts/verify-mod-downloads | 21 +++++++++++++++++++++ 5 files changed, 26 insertions(+) create mode 100644 mods-source/client/modlist.txt create mode 100644 mods-source/forge/modlist.txt create mode 100644 mods-source/server/modlist.txt create mode 100755 scripts/verify-mod-downloads diff --git a/.gitignore b/.gitignore index 2620f78..6e8b31b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*~ build/ mods-source/client/*.jar +mods-source/forge/*.jar mods-source/server/*.jar diff --git a/mods-source/client/modlist.txt b/mods-source/client/modlist.txt new file mode 100644 index 0000000..4c67bf4 --- /dev/null +++ b/mods-source/client/modlist.txt @@ -0,0 +1 @@ +liteloader-1.7.10.jar|http://www.liteloader.com/ diff --git a/mods-source/forge/modlist.txt b/mods-source/forge/modlist.txt new file mode 100644 index 0000000..5dbae54 --- /dev/null +++ b/mods-source/forge/modlist.txt @@ -0,0 +1 @@ +forge-1.7.10-10.13.4.1448-1.7.10-universal.jar|http://files.minecraftforge.net/ diff --git a/mods-source/server/modlist.txt b/mods-source/server/modlist.txt new file mode 100644 index 0000000..ca6ec62 --- /dev/null +++ b/mods-source/server/modlist.txt @@ -0,0 +1 @@ +ForgeMultipart-1.7.10-1.2.0.345-universal.jar|http://files.minecraftforge.net/ForgeMultipart/ diff --git a/scripts/verify-mod-downloads b/scripts/verify-mod-downloads new file mode 100755 index 0000000..1327062 --- /dev/null +++ b/scripts/verify-mod-downloads @@ -0,0 +1,21 @@ +#!/usr/bin/perl +# verify-mod-downloads - Checks a directory full of mod JAR files to make sure they've all been downloaded +# and advises you on where to go to get them if they're not present. +# EJB 11/3/2015 + +die "Usage: $0 directory-name\n" if $#ARGV < 0; +my $dir = $ARGV[0]; +die "$0: $dir is not a directory\n" unless -d $dir; +die "$0: $dir does not contain a modlist.txt\n" unless -f "$dir/modlist.txt"; +open MODLIST, "<$dir/modlist.txt" or die "$0: unable to open $dir/modlist.txt"; +my $missing = 0; +while () { + chomp; + ($modjar, $url) = split(/\|/); + unless (-f "$dir/$modjar") { + print "$modjar is missing - download from $url\n"; + $missing++; + } +} +close MODLIST; +exit ($missing > 0) ? 1 : 0;