Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- root = "http://www.lozengia.com/tmas/Downloads/Minecraft/craftoid/"
- print("Installing craftoid from:" .. root)
- print("Defining Funtions")
- function setdir(directory)
- if fs.exists(directory) == false then
- fs.makeDir(directory)
- end
- end
- function downloadfile(file)
- if fs.exists(file) then
- fs.delete( file )
- end
- local response = http.get(root .. file)
- if response then
- while response do
- local sResponse = response.readAll()
- response.close()
- cache = shell.resolve( file )
- local file = fs.open( cache, "w" )
- file.write( sResponse )
- file.close()
- response = nil
- end
- end
- end
- print("Defining files to install")
- directorys = { "installed" }
- files = { "startup", "craftoid.nfp", "lockscreen.ico", "installed/missingicon.ico", "installed/appstore", "installed/appstore.ico", "installed/ccTube", "installed/ccTube.ico", "installed/dj", "installed/dj.ico", "installed/edit", "installed/edit.ico", "installed/firebox", "installed/firebox.ico", "installed/gps", "installed/gps.ico", "installed/id", "installed/id.ico", "installed/paint", "installed/paint.ico", "installed/pastebin", "installed/pastebin.ico", "installed/shell", "installed/shell.ico", "installed/time", "installed/time.ico", "installed/worm", "installed/worm.ico" }
- i = 1
- while directorys[i] do
- print("Creating directory:" .. directorys[i])
- setdir(directorys[i])
- i=i+1
- end
- i = 1
- while files[i] do
- print("Downloading File:" .. files[i])
- downloadfile(files[i])
- i=i+1
- end
- print("Rebooting")
- shell.run("reboot")
Advertisement
Add Comment
Please, Sign In to add comment