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

Apt-Get: Customizable way to pastebin!

Started by Cloud Ninja, 13 March 2015 - 11:43 PM
Cloud Ninja #1
Posted 14 March 2015 - 12:43 AM
APT-GET

Originally for ScaptOS, this program allows you to edit the code of it to organize your pastebinning needs.


args = {...}
Code = args[1]
Name = args[2]
if Code == nil or Name == nil then
print("Invalid Code/Name Input")
print("Correct Usage: apt-get Code Name")
elseif not fs.exists("/repo") then
print("/repo Not Found!")
sleep(1)
print("Making Directory")
fs.makeDir("/repo")
shell.run("pastebin","get "..Code.." /repo/"..Name)
else
shell.run("pastebin","get "..Code.." /repo/"..Name)
end

It consists of 15 lines of code.

Edit lines 7, 12, and 14 in order to get the desired directory of where to put pastebinned files.

Feel free to use this in any OS's, just please credit me if possible!

To install: Pastebin get Jqu9yx0a install

Then, run install
Edited on 14 March 2015 - 12:19 AM
biggest yikes #2
Posted 18 March 2015 - 08:06 PM
This is nowhere close to what Apt-Get does, just going to throw that out there. And having to edit multiple lines? You could just get it from a variable. All it does is save a file in a directory.. I could easily make my own OS that creates the folder and saves files in it. No need to use a program like this.
Edited on 18 March 2015 - 07:08 PM
Cloud Ninja #3
Posted 19 March 2015 - 01:41 AM
This is nowhere close to what Apt-Get does, just going to throw that out there. And having to edit multiple lines? You could just get it from a variable. All it does is save a file in a directory.. I could easily make my own OS that creates the folder and saves files in it. No need to use a program like this.
Ive actually recently edited it. Its not ready yet for public use but ill be posting it soon. It now has the functions that apt-get actually has in debian linux. install, remove, autoclean, stuff like that.
gametechish #4
Posted 19 March 2015 - 06:54 AM
Cool when this gets updated and has these new features I'll use it as my computers tend to get cluttered with PasteBin files after a while
biggest yikes #5
Posted 19 March 2015 - 05:00 PM
This is nowhere close to what Apt-Get does, just going to throw that out there. And having to edit multiple lines? You could just get it from a variable. All it does is save a file in a directory.. I could easily make my own OS that creates the folder and saves files in it. No need to use a program like this.
Ive actually recently edited it. Its not ready yet for public use but ill be posting it soon. It now has the functions that apt-get actually has in debian linux. install, remove, autoclean, stuff like that.
Alright, :)/>
Cloud Ninja #6
Posted 19 March 2015 - 07:26 PM
Cool when this gets updated and has these new features I'll use it as my computers tend to get cluttered with PasteBin files after a while
I actually need to wait til this weekend to do it, the files currently on my friends lan world that he port forwards for us to work on the OS. So whenever i can ill update.
Cloud Ninja #7
Posted 19 March 2015 - 09:30 PM
Alright, :)/>
Currently i have it autoclean so that if you have too many files in the Dir, itll wipe them and all file dependencies related to it at your discretion, remove to remove a certain file, install to install packages from pastebin (friend currently working on an API for our OS to install our own files from his site), and autoremove, to remove ONLY the downloaded files, none created by the program or otherwise.
minebuild02 #8
Posted 29 March 2015 - 10:03 AM
Can I use this in my OS?
Cloud Ninja #9
Posted 29 March 2015 - 05:07 PM
Can I use this in my OS?
Once i finish the update on it, sure! Its not 100% done yet