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

Auto Updater! V1.2

Started by Engineer, 25 March 2013 - 10:50 AM
Engineer #1
Posted 25 March 2013 - 11:50 AM
Auto updater

This program allows you to update complete repositories from github, single files from repositories or even from pastebin! When you enter a file, or repo, with the correct arguments, it get's added to the list to auto-update it. Currently there is no way of removing an entry on the list, but you can do that manually by editing the /.update file.

The program has the following arguments:
  • Updater git <User/Project> <branch> <targetFolder>
  • SpoilerUser/Project
    This simply defines the owner of the project, and the project is the repo in question.
    branch
    This defines the branch of the repository
    targetFolder
    The folder that is going to contain repo, though be warned that it simply deletes the folderif it already exists.

    Example:
    Updater EngineerCoding/MultiPeripheral master mp
  • Updater gitfile <User/Project/File> <branch> <targetFile>
  • SpoilerUser/Project/File
    This simply defines the owner of the project, and the project is the repo in question. Also it adds the file you want to be downloaded.
    branch
    This defines the branch of the repository.
    targetFile
    This is the file where the contents of the downloaded content is going to be stored. This file is deleted when detected, so don't complain here about that!

    Example:
    Updater gitfile EngineerCoding/Miscellaneous-Lua-Projects/updater.lua master updater
  • Updater pastebin <code> <file>
  • SpoilerCode
    The pastebin code of the url
    File
    This is the file where the contents of the downloaded content is going to be stored. This file is deleted when detected, so don't complain here about that!

    Example:
    Updater pastebin iqwUVdbA updater
You can also add a -m argument anywhere, this basically says that it doesn't get added to the list, so with the -m it is just a downloader.

When the program is ran, it always updates the whole list! I am planning to add a hook in to disable that, but that is for later.

Direct link: Pastebin
Most up-to-date: Github

pastebin get iqwUVdbA update

This is an HTTP program, turn it on in your config file!

Changelog:
Spoiler24-3-2013
- Initial Release!
25-3-2013
- Version 1.1 out!
- Bug fixes
30-4-2014
- Complete revamp!

Known Issues
Spoiler- Currently Auto getOff is broken, this will delete the WHOLE list. Fixed!

Future updates
Spoiler- Github support Done!
- GUI support
- Browse through repo's and stuff
- Better manual support
- Disable the list update
- Use as default branch master
- Support for names with a space in gitfile

I am really open to suggestions, if you have a good one, dont be afraid to say it! :)/>
Enoy the program,

- Engineer
Edited on 29 April 2014 - 10:38 PM
AnDwHaT5 #2
Posted 25 March 2013 - 12:02 PM
Here this is a simple program i will fix your errors if the code is as i think it is. I can also set it to update every time the startup file is launched and i can make it to perm update something all the time. Or when command is used up updates programs through a config file.
Engineer #3
Posted 25 March 2013 - 12:25 PM
Here this is a simple program i will fix your errors if the code is as i think it is. I can also set it to update every time the startup file is launched and i can make it to perm update something all the time. Or when command is used up updates programs through a config file.
That doesnt fit in with the concept though.

But anyway, show me some code!
Engineer #4
Posted 26 March 2013 - 01:38 AM
Version 1.1 is out!

Fixed some annoying bugs.
NonStopGamer #5
Posted 26 March 2013 - 04:52 AM
This is pretty nice, but there's an issue. When people update their programs, they usually create a new paste, so….
But I guess it is still useful if you mess up the code and you wana reinstall.
It would be useful with github I guess….
Engineer #6
Posted 26 March 2013 - 05:00 AM
This is pretty nice, but there's an issue. When people update their programs, they usually create a new paste, so….
But I guess it is still useful if you mess up the code and you wana reinstall.
It would be useful with github I guess….
On pastebin you can create an account, and then you can edit your files. That is why you would want this.

Edit: It's free! :D/>
DeliciousJaffa #7
Posted 30 March 2013 - 02:26 PM
I'd like to let you know I've edited your program to my needs and of course added a link back to this thread, feel free to use my code with credit. http://pastebin.com/JW4uj2Jw
goldensecret #8
Posted 04 March 2014 - 03:51 PM
can i use this program, to update this program? or is this not being updated anymore
Engineer #9
Posted 27 April 2014 - 11:45 PM
I honestly totally forgot about this. It is that I was super bored and decided to browse the programs section, and cross along this!
It's been a long time since I have written this, and I obviously am better with code now.
Expect an update soon. :)/>

Edit: I just saw I apparantly deleted the paste, so starting from scratch is neccesary, though I was planning to do that. While I'm at it, I'll probably add gui support, github support and some hooks in the github and pastebin api
Edited on 27 April 2014 - 09:49 PM
sjkeegs #10
Posted 28 April 2014 - 03:34 AM
Edit: I just saw I apparantly deleted the paste, so starting from scratch is neccesary…

I have a copy of what might be your latest update if you want me to stick it in a pastebin.
Engineer #11
Posted 28 April 2014 - 10:11 AM
I have a copy of what might be your latest update if you want me to stick it in a pastebin.
Thanks for the offer, but I decline it. Just for the reason I want to start from scratch again and build it up. Expect a working version with just pastebin support very soon, though note, the arguments won't be the same, but similair :)/>
Engineer #12
Posted 30 April 2014 - 12:39 AM
Updated the OP.

Please leave suggestions and some feedback, I really appreciate those :)/>
Thanks