Skip to content

Instantly share code, notes, and snippets.

@allaryin
Last active January 7, 2016 03:25
Show Gist options
  • Save allaryin/f7c28f579c9e3fa7b666 to your computer and use it in GitHub Desktop.
Save allaryin/f7c28f579c9e3fa7b666 to your computer and use it in GitHub Desktop.
Script to invoke fastpack one-off on a single mod file
#!/bin/sh
JAR='MCU-FastPack-latest.jar'
URL='http://files.mcupdater.com/base/mods'
FORGE='10.13.4.1558'
MC='1.7.10'
##########
if [ ! -f "$1" ]; then
echo "Syntax: $0 <mod.jar>"
exit 1
fi
DIR=`mktemp -d fastpack.XXXXX`
cp $1 ${DIR}
OUT=`mktemp fastpack.XXXXX.xml`
java -jar ${JAR} --noConfigs --baseURL "${URL}" --mc "${MC}" --forge "${FORGE}" --path "${DIR}" --out "${OUT}"
cat ${OUT}
rm -rf ${DIR} ${OUT}
$ ./fastpack.sh E-Mobile-MC1.7.10-1.2.1.jar
fastpack.J3utG\E-Mobile-MC1.7.10-1.2.1.jar: 100 entries in file.
<?xml version="1.0" encoding="UTF-8"?>
<ServerPack version="3.3" xmlns="http://www.mcupdater.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mcupdater.com http://files.mcupdater.com/ServerPackv2.xsd">
        <Server id="fastpack" name="FastPack Instance" newsUrl="about:blank" version="1.7.10" mainClass="net.minecraft.launchwrapper.Launch" revision="1" autoConnect="true">
                <Import url="http://files.mcupdater.com/example/forge.php?mc=1.7.10&amp;forge=10.13.4.1558">forge</Import>
                <Module name="E-Mobile" id="emobile" depends="" side="BOTH">
                        <URL priority="0">http://files.mcupdater.com/base/mods//E-Mobile-MC1.7.10-1.2.1.jar</URL>
                        <Size>337311</Size>
                        <Required>true</Required>
                        <ModType>Regular</ModType>
                        <MD5>cb2a821a945c6c55c379dce7de413165</MD5>
                        <Meta>
                                <credits>sk89q, BAMgames, kevba10</credits>
                                <description>Ring ring, I&apos;d like to teleport! Adds the Ender Cellphone. This item lets players teleport to each other, or to spawn or their beds. Original concept by sk89q.</description>
                                <version>1.2.1</version>
                                <url></url>
                                <authors>tonius11</authors>
                        </Meta>
                </Module>
                <Module name="Minecraft Forge" id="forge-10.13.4.1558" depends="" side="BOTH">
                        <Size>100000</Size>
                        <Required>true</Required>
                        <ModType order="1">Override</ModType>
                </Module>
        </Server>
</ServerPack>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment