sierra-modpack/Makefile

61 lines
2.1 KiB
Makefile

# Makefile for Erbosoft Sierra Modpack
# AGRB 1/24/2023
VERSION=0.1
FORGEMOD=forge-1.12.2-14.23.5.2859-universal.jar
FORGEINSTALLER=forge-1.12.2-14.23.5.2859-installer.jar
all: client-modpack server-pack
client-modpack: verify-mods
mkdir -p build/client
-rm -rf build/client/*
mkdir build/client/{bin,config,coremods,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 -r config-source/* build/client/config
-rm -f build/erbosoft-sierra-${VERSION}.zip
cd build/client; zip -r ../erbosoft-sierra-${VERSION}.zip .
server-pack: verify-mods
mkdir -p build/server
-rm -rf build/server/*
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
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
sed -e 's/@FORGEJAR@/${FORGEMOD}/' scripts/launch.bat.template > build/server/launch.bat
unix2dos build/server/launch.bat
cp scripts/eula.txt.template build/server/eula.txt
sed -e 's/@VERSION@/${VERSION}/' scripts/server.properties.template > build/server/server.properties
-rm -f build/erbosoft-sierra-server-${VERSION}.zip
cd build/server; zip -r ../erbosoft-sierra-server-${VERSION}.zip .
verify-mods:
scripts/verify-mod-downloads mods-source/forge
scripts/verify-mod-downloads mods-source/server
scripts/verify-mod-downloads mods-source/client
sort-modlists:
scripts/sort-modlist mods-source/forge
scripts/sort-modlist mods-source/server
scripts/sort-modlist mods-source/client
clean:
-rm -rf build/
find . -name '*~' -delete