Makefile now generates client and server zip files

This commit is contained in:
Amy G. Bowersox 2023-01-24 21:30:12 -07:00
parent fc85492a28
commit 0795748398
2 changed files with 10 additions and 31 deletions

View File

@ -10,14 +10,13 @@ all: client-modpack server-pack
client-modpack: verify-mods
mkdir -p build/client
-rm -rf build/client/*
mkdir build/client/{bin,config,coremods,mods}
mkdir build/client/bin
mkdir build/client/config
mkdir build/client/coremods
mkdir build/client/mods
cp mods-source/forge/${FORGEMOD} build/client/bin/modpack.jar
for i in $(scripts/list-mods mods-source/server); do
cp mods-source/server/$i build/client/mods
done
for i in $(scripts/list-mods mods-source/client); do
cp mods-source/client/$i build/client/mods
done
cp mods-source/server/*.jar build/client/mods
cp mods-source/client/*.jar build/client/mods
cp -r config-source/* build/client/config
-rm -f build/erbosoft-sierra-${VERSION}.zip
cd build/client; zip -r ../erbosoft-sierra-${VERSION}.zip .
@ -28,13 +27,10 @@ server-pack: verify-mods
cp mods-source/forge/${FORGEINSTALLER} build/server
cd build/server; java -jar ./${FORGEINSTALLER} -installServer
rm -f build/server/${FORGEINSTALLER}*
mkdir build/server/{config,mods}
for i in $(scripts/list-mods mods-source/server); do
cp mods-source/server/$i build/server/mods
done
for i in $(scripts/list-mods mods-source/client); do
cp mods-source/client/$i build/server/mods
done
mkdir build/server/config
mkdir build/server/mods
cp mods-source/server/*.jar build/server/mods
cp mods-source/client/*.jar build/server/mods
cp -r config-source/* build/server/config
sed -e 's/@FORGEJAR@/${FORGEMOD}/' scripts/launch.sh.template > build/server/launch.sh
chmod 755 build/server/launch.sh

View File

@ -1,17 +0,0 @@
#!/usr/bin/perl
# list-mods - Lists out the contents of the modlist.txt to just show the mod JAR names.
# AGRB 1/24/2023
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";
while (<MODLIST>) {
chomp;
next if /^\s*#/;
($modjar, $url) = split(/\|/);
print "$modjar\n"
}
close MODLIST;
exit 0;