Last active
January 27, 2023 15:50
-
-
Save JohnTheCoolingFan/eb0587b1156b137cb1cbf7111e82d14b to your computer and use it in GitHub Desktop.
A simple script that uses 7zip to build a Factorio mod and put it into the mods folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
MODNAME="$(cat info.json | jq -r ".name")" | |
MODVERSION="$(cat info.json | jq -r ".version")" | |
mkdir -p "/tmp/buildmod/$MODNAME"_"$MODVERSION/" | |
cp -r * "/tmp/buildmod/$MODNAME"_"$MODVERSION/" | |
rm ~/.factorio/mods/"$MODNAME"* | |
7z a -sdel "/tmp/buildmod/$MODNAME"_"$MODVERSION.zip" "/tmp/buildmod/$MODNAME"_"$MODVERSION" > /dev/null | |
mv "/tmp/buildmod/$MODNAME"_"$MODVERSION.zip" ~/.factorio/mods/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment