←  APIs and Utilities

ComputerCraft | Programmable Computers for Minecraft

»

PasteUpdate: A simple way of implementing...

FuzzyLitchi's Photo FuzzyLitchi 10 Mar 2017

PasteUpdate

PasteUpdate is a super simple way to use pastebin and now github to push updates.

For pastebin:
First upload your code to pastebin. Then edit your paste and include the paste id to the top of you program as so.
--pastebin:0123abcd

doProgramStuff()
...

Your program is now ready to be installed.
To push an update to your program simply edit the paste and insert the new code, remember to keep the paste id the same.

For github:
Upload your code to github and include the link at the top as so.
--github:FuzzyLitchi/BulletStorm/master/main.lua

doProgramStuff()
...
or
--github:/FuzzyLitchi/BulletStorm/master/main.lua

doProgramStuff()
...

you can find this link by clicking "raw" on a github file, this link will be transformed into this
https://raw.githubusercontent.com/FuzzyLitchi/BulletStorm/master/main.lua

As a user to update a program you will need to install PasteUpdate, this can be done with this command.
pastebin get 9YZLyYAD pasteUpdate
To update a program run the command pasteUpdate <program name>.
You can also update pasteUpdate by running the command "pasteUpdate pasteUpdate".

Currently it creates a backup of the older version as to not destroy files incase of any bugs.
Edited by FuzzyLitchi, 12 March 2017 - 05:16 PM.
Quote

lolmaker2002's Photo lolmaker2002 11 Mar 2017

this is pretty cool, is there any way you could make it work from external sites? (for example: make it pull it of github rather than pastebin)
Quote

FuzzyLitchi's Photo FuzzyLitchi 12 Mar 2017

Yeah i'll add an option for github
Quote

FuzzyLitchi's Photo FuzzyLitchi 12 Mar 2017

I have now updated it, check OP for information about the new github feature.
Quote

FuzzyLitchi's Photo FuzzyLitchi 24 Mar 2017

I'm working on adding a generic tag where one can paste a full url and forget about the rest, but surprisingly i am having more problems with this than the pastebin and github tag combined. :huh:
Quote