Last active
December 16, 2015 04:29
-
-
Save icedream/5377821 to your computer and use it in GitHub Desktop.
Example Lua script to describe how to install/uninstall mods.
This file contains hidden or 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
| -- Example instructions file for a mod in the | |
| -- Craftitude Repository system | |
| -- As applicable to draft 0.7 (upcoming) | |
| function Install() | |
| -- Download a file | |
| var download = GetResolver("download", { url="http://this.is.a.websi.te/with/an/archive/on/it.zip" }) | |
| -- Convert the download to a usable archive | |
| var archive = GetResolver("archive", { input = download }) | |
| -- Install JAR into "mods" folder | |
| -- Inject repacks all the files | |
| archive:InjectTo("mods/thisisamod.jar") | |
| end | |
| function Uninstall() | |
| -- Delete JAR from "mods" folder | |
| DeleteFile("mods/thisisamod.jar") | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment