This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
FuzzyLitchi's profile picture

PasteUpdate: A simple way of implementing updating into your program

Started by FuzzyLitchi, 10 March 2017 - 10:50 PM
FuzzyLitchi #1
Posted 10 March 2017 - 11:50 PM
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 on 12 March 2017 - 04:16 PM
lolmaker2002 #2
Posted 11 March 2017 - 03:20 PM
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)
FuzzyLitchi #3
Posted 12 March 2017 - 01:03 PM
Yeah i'll add an option for github
FuzzyLitchi #4
Posted 12 March 2017 - 05:10 PM
I have now updated it, check OP for information about the new github feature.
FuzzyLitchi #5
Posted 24 March 2017 - 11:29 PM
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:/>